Computer Science
Topic 2. Probability Theory
and Discrete Probability
Distributions
1)Probability Theory Introduction
(including R):
What is probability theory?
● Probability theory is a mathematical theory used to formalise
randomness and chances.
● Measure theory, random variables, and processes are needed to
describe random experiments.
● The goal of this course is to understand and apply the central limit
theorem and statistical tests.
,Example of probability
● Throwing a normal six-sided die, the probability of getting an even
number is one half (i.e. $p(a) = 1/2$).
● This number comes in when we have a lot of throws, after counting
the number of even numbers and dividing by the total number of
throws.
● This works like a normal limit process in analysis, which will be
discussed in a future video.
Using R
● RStudio is used in this course to understand probabilities and do
random experiments.
● Variables can be defined and assigned values, and vectors/lists
are created with the "c" command.
● The "sample" command can be used to simulate a die throw, and
the "?command" is used to access the manual.
2)Probability Measures:
Sample Space
● The sample space is usually known as Omega, and is visualised
as a rectangle or square in the plane.
● Omega includes all the possible outcomes of a random
experiment.
Probability Measure
● A probability measure is a map that assigns probability values to
subsets.
● This map should return a number between 0 and 1, with the total
mass being 1.
,Adding Probabilities
● When two subsets are disjoint (i.e. they have no overlap) their
probabilities can be added.
● This means that the probability of the union of these two subsets
should be the sum of both probabilities.
Empty Set
● The probability of the empty set should be defined as 0, as it is
impossible to get no outcome at all.
Limit Process
● When dealing with a countable union of subsets, the probability
should add up in a limit process.
● This means that the family of subsets should be pairwise disjoint.
Sigma Algebra
● To satisfy the requirements of a probability measure, a sigma
algebra is needed.
● This is a collection of subsets which fulfil certain rules.
Defining a Probability Measure
● Events in probability theory are elements of a sigma algebra.
● This sigma algebra must contain the empty set and the whole
sample space.
● It also must contain the complement of any subset, and the union
of countably many sets.
● A probability measure is a map with domain and codomain the
interval 0 to 1, which satisfies two properties.
● The first property is that the probability of the whole space is one,
and the probability of an empty event is zero.
● The second property is sigma additivity, which requires pairwise
disjoint sets.
, Example of a Probability Measure
● Consider an ordinary die, where the sample space is all possible
outcomes (1 to 6).
● The sigma algebra is the power set.
● The probability measure is defined as the number of elements of a
divided by the number of elements in the sample space, meaning
that each side has the same probability.
● For example, the probability of throwing a two is one over six, and
the probability of throwing an even number is three divided by six
(or, one half).
Closing Exercise
● Prove that for a general probability measure p and an event a, the
probability of the complement is 1 minus the probability of a.
3)Discrete vs. Continuous Case:
Discrete Case
● The discrete case deals with problems that have a finite or
countable number of outcomes.
● An example of a discrete case is flipping a coin, which has two
outcomes.
● Another example of a discrete case is throwing a die infinitely
many times and counting how many throws it takes to get the first
six.
Continuous Case
● The continuous case deals with problems that have an
uncountable number of outcomes.
● An example of a continuous case is a dart board, where all the
values in the disk are possible outcomes.
● In the continuous case, the sample space omega should be a
subset of Rn and should be a so-called bowel set.
Topic 2. Probability Theory
and Discrete Probability
Distributions
1)Probability Theory Introduction
(including R):
What is probability theory?
● Probability theory is a mathematical theory used to formalise
randomness and chances.
● Measure theory, random variables, and processes are needed to
describe random experiments.
● The goal of this course is to understand and apply the central limit
theorem and statistical tests.
,Example of probability
● Throwing a normal six-sided die, the probability of getting an even
number is one half (i.e. $p(a) = 1/2$).
● This number comes in when we have a lot of throws, after counting
the number of even numbers and dividing by the total number of
throws.
● This works like a normal limit process in analysis, which will be
discussed in a future video.
Using R
● RStudio is used in this course to understand probabilities and do
random experiments.
● Variables can be defined and assigned values, and vectors/lists
are created with the "c" command.
● The "sample" command can be used to simulate a die throw, and
the "?command" is used to access the manual.
2)Probability Measures:
Sample Space
● The sample space is usually known as Omega, and is visualised
as a rectangle or square in the plane.
● Omega includes all the possible outcomes of a random
experiment.
Probability Measure
● A probability measure is a map that assigns probability values to
subsets.
● This map should return a number between 0 and 1, with the total
mass being 1.
,Adding Probabilities
● When two subsets are disjoint (i.e. they have no overlap) their
probabilities can be added.
● This means that the probability of the union of these two subsets
should be the sum of both probabilities.
Empty Set
● The probability of the empty set should be defined as 0, as it is
impossible to get no outcome at all.
Limit Process
● When dealing with a countable union of subsets, the probability
should add up in a limit process.
● This means that the family of subsets should be pairwise disjoint.
Sigma Algebra
● To satisfy the requirements of a probability measure, a sigma
algebra is needed.
● This is a collection of subsets which fulfil certain rules.
Defining a Probability Measure
● Events in probability theory are elements of a sigma algebra.
● This sigma algebra must contain the empty set and the whole
sample space.
● It also must contain the complement of any subset, and the union
of countably many sets.
● A probability measure is a map with domain and codomain the
interval 0 to 1, which satisfies two properties.
● The first property is that the probability of the whole space is one,
and the probability of an empty event is zero.
● The second property is sigma additivity, which requires pairwise
disjoint sets.
, Example of a Probability Measure
● Consider an ordinary die, where the sample space is all possible
outcomes (1 to 6).
● The sigma algebra is the power set.
● The probability measure is defined as the number of elements of a
divided by the number of elements in the sample space, meaning
that each side has the same probability.
● For example, the probability of throwing a two is one over six, and
the probability of throwing an even number is three divided by six
(or, one half).
Closing Exercise
● Prove that for a general probability measure p and an event a, the
probability of the complement is 1 minus the probability of a.
3)Discrete vs. Continuous Case:
Discrete Case
● The discrete case deals with problems that have a finite or
countable number of outcomes.
● An example of a discrete case is flipping a coin, which has two
outcomes.
● Another example of a discrete case is throwing a die infinitely
many times and counting how many throws it takes to get the first
six.
Continuous Case
● The continuous case deals with problems that have an
uncountable number of outcomes.
● An example of a continuous case is a dart board, where all the
values in the disk are possible outcomes.
● In the continuous case, the sample space omega should be a
subset of Rn and should be a so-called bowel set.