Statistics Topic Video 2 Slides
Statistics Topic Video 2 Slides
Probability theory
Statistics (ECB1STAT)
Utrecht University School of Economics
Topics covered
Random variables;
Properties of probabilities;
Sets and Events, including, e,g., the intersection and union of events;
Statistical independence;
Bayes’ Theorem.
1
28/01/2024
Before the outcome is known, there is often uncertainty about what the outcome will be.
2
28/01/2024
Properties of probabilities
The probability of a single outcome 𝑂 is greater than or equal to 0 and less than or equal to 1:
0≤𝑃 𝑂 ≤1
The set of all possible outcomes of a random variable is the sample space 𝑆, hence 𝑂 ∈ 𝑆 (∈:‘element of’)
𝑃 𝑆 =∑ ∈ 𝑃(𝑂) = 1
Properties of probabilities
The probabilities are, for this example, the same for each outcome: 𝑃 𝑂 = for 𝑂 ∈ 𝑆
0 ≤ 𝑃 𝑂 ≤ 1 for 𝑂 ∈ 𝑆 (check!)
The sum of the probabilities of each of the possible outcomes equals 1:
𝑃 𝑆 =∑ ∈ 𝑃(𝑂)
=𝑃 1 +𝑃 2 +𝑃 3 +𝑃 4 +𝑃 5 +𝑃 6
= + + + + + =1 (check!)
3
28/01/2024
Events
Events
with 𝑃 𝐴̅ = ∑ ∈ ̅ 𝑃(𝑂 ) =𝑃 1 +𝑃 3 +𝑃 5 =
𝑃 𝐴̅ = 1 − 𝑃 𝐴 = 1 − = (check!)
4
28/01/2024
Events
• 𝑃 𝐴∩𝐵 =∑ ∈ ∩ 𝑃(𝑂 );
• General rule: 𝑃 𝐴 ∪ 𝐵 = 𝑃 𝐴 + 𝑃 𝐵 − 𝑃 𝐴 ∩ 𝐵 .
Events
10
5
28/01/2024
11
Bivariate probabilities
Two random variables X and Y with sample spaces SX and SY, respectively.
Also:
12
6
28/01/2024
Of all cars in the population, the table to the right provides CD No CD Total
information how many have an airco (AC), a compact disk AC 20% 50% 70%
player (CD), or both. The table provides percentages. E.g., 70%
of the cars have an AC. No AC 20% 10% 30%
What is the probability that a car has a CD and has an AC? Total 40% 60% 100%
The answer can be seen straightaway from the table, but how
do you write down your answer?
Steps:
1. X = whether a car has a CD, Y = whether a car has an AC
2. Outcome spaces: SX = {CD, No CD} , SY = {AC, No AC}.
3. Event A= {CD} , Event B = {AC}
4. Asked for: 𝑃 𝐴 ∩ 𝐵 ?
5. Answer: 𝑃 𝐴∩𝐵 =𝑃 𝐶𝐷, 𝐴𝐶 = = 0.2
13
Conditional probability
Two random variables X and Y with sample spaces SX and SY, respectively.
Event A is a subset of SX and event B is a subset of SY.
The conditional probability 𝑃 | 𝐴|𝐵 is the probability that event 𝐴 occurs given (or
conditional on) that event 𝐵 occurs.
In short: 𝑃 | 𝐴|𝐵 is the probability of A given B.
The conditional probability:
∩
(General formula) 𝑃 | 𝐴|𝐵 = ,
( )
14
7
28/01/2024
Interpretation:
the probability that a car with an airco has a CD player is 28.6%.
15
Statistical independence
Two random variables X and Y, sample spaces 𝑆 and 𝑆 , event 𝐴 ∈ 𝑆 and event 𝐵 ∈ 𝑆 .
The two events A and B are statistically independent if the conditional probability of A given B
equals the probability of A:
𝑃 | 𝐴|𝐵 = 𝑃 𝐴
Intuition: the outcome of Y provides no information about the probability of the outcome of X.
Also, under the independence assumption:
– 𝑃 𝐴 ∩ 𝐵 =𝑃 𝐴 ⋅ 𝑃 𝐵 (intersection)
– 𝑃 𝐴∪𝐵 =𝑃 𝐴 +𝑃 𝐵 −𝑃 𝐴 ⋅𝑃 𝐵 (union)
A general rule: X and Y are independent if:
𝑃 | 𝑋|𝑌 = 𝑃 𝑋
Or, equivalently, 𝑃 𝑋, 𝑌 = 𝑃 𝑋 ⋅ 𝑃 𝑌
16
8
28/01/2024
Of all cars in the population, the table to the right provides CD No CD Total
information how many have an airco (AC), a compact disk AC 20% 50% 70%
player (CD), or both. The table provides percentages. E.g.,
70% of the cars have an AC. No AC 20% 10% 30%
17
Bayes’ Theorem
𝑃 𝐴|𝐵 ⋅ 𝑃 𝐵
𝑃 𝐵|𝐴 =
𝑃 𝐴
∩
Check it is a ‘simple’ rewrite of conditional probabilities: 𝑃 𝐴|𝐵 ⋅ 𝑃 𝐵 = 𝑃 𝐴 ∩ 𝐵 => 𝑃 𝐵|𝐴 =
18
9
28/01/2024
19
Random variable 𝑌 = the box opened by the quizmaster to show it does not contain the prize. 𝑦 ∈ {2, 3}
Whether the candidate should switch from box 1 to box 2 depends on the probability that the prize is
in box 1 given the prize is not in box 3.
Recognize that this is a conditional probability: 𝑃 | 1|3 .
20
10
28/01/2024
21
Apply Bayes’ theorem to find the probability that the prize is in box 1, given the quizmaster showed the
| | ⋅
prize is not in box 3: 𝑃 | 1|3 = , where 𝑃 1 = , 𝑃 | 3|1 = (previous slide)
Compute (ingredients on previous slide):
𝑃 3 =∑ 𝑃 | 3|𝑥 ⋅ 𝑃 𝑥 = 𝑃 | 3|1 ⋅ 𝑃 1 + 𝑃 | 3|2 ⋅ 𝑃 2 + 𝑃 | 3|3 ⋅ 𝑃 3
1 1 1 1 3 1
= ⋅ +1⋅ +0⋅ = =
2 3 3 3 6 2
| | ⋅ ⋅ 𝟏
Hence (prize in box 1), 𝑃 | 1|3 = = =
𝟑
𝟐
And (prize in box 2), 𝑃 | 2|3 = 1 − 𝑃 | 1|3 =
𝟑
Note: 𝑃 | 1|3 < 𝑃 | 2|3
22
11
28/01/2024
23
12