Chapter 3
Chapter 3
Chapter 3
Elements of chance: Probability Methods
2021-22
1 / 65
Contents
1 Introduction
3 Bivariate Probabilities
Bayes Theorem
2 / 65
Contents
1 Introduction
3 Bivariate Probabilities
Bayes Theorem
3 / 65
Introduction
4 / 65
Definitions
• Probability: A value between zero and one, inclusive, describing
the relative possibility (chance or likelihood) an event will occur.
• Experiment: A process that leads to the occurrence of one and
only one of several possible observations.
• Outcome: A particular result of an experiment.
• Event: A collection of one or more outcomes of an experiment.
• Sample space: The set of all possible outcomes of an experi-
ment. The sample space is usually denoted by S.
Example: If the experiment consists of flipping two coins and noting
whether they land heads or tails, then
1 Introduction
3 Bivariate Probabilities
Bayes Theorem
6 / 65
Random experiment
7 / 65
Sample Space
S = 1, 2, 3, 4, 5, 6
8 / 65
Event
EventA = 1, 3, 5
9 / 65
Set theory
A ∩ B : {x|x ∈ A, andx ∈ B}
• Union ⇒ A ∪ B
A ∪ B : {x|x ∈ A, orx ∈ B}
• Complement ⇒ A → Ac
• Difference ⇒ A ∩ B c
A \ B : A ∩ Bc
10 / 65
Set theory
• A = B: A ⊂ B and B ⊂ A.
11 / 65
Intersection
12 / 65
Intersection: Venn Diagram
13 / 65
Intersection: Venn Diagram
14 / 65
Union
15 / 65
Union: Venn Diagram
16 / 65
Complement
17 / 65
Complement: Venn Diagram
18 / 65
Venn Diagram
19 / 65
Postulates of probability
• Objective probability
• Classical probability: the proportion of times that an event will
occur, assuming that all outcomes in a sample are equally
likely to occur. The probability of an event is determined
dividing the number of outcomes that satisfy the event by the
total number of outcomes in the sample space.
NA
P (A) =
N
• Empirical probability: The probability of an event happening is
the fraction of the time similar events happened in the past.
The proportion of times that an event A occurs in a large
number of trials, n.
nA
P (A) =
n
• Subjective probability: The likelihood (probability) of a
particular event happening that is assigned by an individual
based on whatever information is available.
20 / 65
Properties of probability
Consider an experiment whose sample space is S. We suppose that
for each event A there is a number, denoted P (A) and called the
probability of event A, that is in accord with the following three
properties:
• For any event A, the probability of A is a number between 0
and 1:
0 ≤ P (A) ≤ 1
• The probability of sample space S is 1:
P (S) = 1
• The probability of the union of disjoint events is equal to the
sum of the probabilities of these events. For instance, if A and
B are disjoint, then:
P (A ∪ B) = P (A) + P (B)
21 / 65
Law of large numbers
22 / 65
Combinations and permutations
23 / 65
Permutations
24 / 65
Permutations with repetition
n ∗ n ∗ n...(rtimes) = nr
25 / 65
Permutations without repetition
In this case, we have to reduce the number of available choices each
time. We will use the factorial function (3! = 3 ∗ 2 ∗ 1). Remember
0! = 1
Example: what order could 16 pool balls be in?
After choosing, say, number ”14” we can’t choose it again. So,
our first choice has 16 possibilities, and our next choice has 15
possibilities, then 14, 13, 12, 11, ... etc. And the total permutations
are:
16 ∗ 15 ∗ 14 = 3., 360
There are 3.360 different ways that 3 pool balls could be arranged
out of 16 balls. 26 / 65
Permutations without repetition
16! 16 ∗ 15 ∗ 14 ∗ 13...
= = 16 ∗ 15 ∗ 14
13! 13 ∗ 12...
13 is cancelled out, leaving only 16 ∗ 15 ∗ 14
Therefore, the formula is:
n!
(n − r)!
27 / 65
Permutations without repetition
16! 16
= = 3, 360
(16 − 3)! 13
Example: How many ways can first and second place be awarded to
10 people?
10! 10
= = 90
(10 − 2)! 8
28 / 65
Combinations without Repetition
29 / 65
Combinations without Repetition
For example, let us say balls 1, 2 and 3 are chosen. These are the
possibilities:
30 / 65
Combinations without Repetition
n! 1 n!
∗ =
(n − r)! r! r!(n − r)!
Different notation:
n n!
=
r r!(n − r)!
31 / 65
Combinations without Repetition
n! 16!
= = 560
r!(n − r)! 3!(16 − 3)!
32 / 65
Combinations with Repetition
Let us say there are five flavors of ice cream: banana, chocolate,
lemon, strawberry and vanilla.
We can have three scoops. How many variations will there be?
Let’s use letters for the flavors: {b, c, l, s, v}. Example selections
include:
• {c, c, c} (3 scoops of chocolate)
• {b, l, v} (one each of banana, lemon and vanilla)
• {b, v, v} (one of banana, two of vanilla)
There are n = 5 things to choose from, we choose r = 3 of them,
order does not matter, and we can repeat!
33 / 65
Combinations with Repetition
Think about the ice cream being in boxes or containers, we could
say ”move past the first box, then take 3 scoops, then move along
3 more boxes to the end” and we will have 3 scoops of chocolate.
b c l s v
3 scoops of chocolate :
→ ◦ ◦ ◦ →→→
◦ →→ ◦ →→ ◦
◦ →→→→ ◦◦
34 / 65
Combinations with Repetition
Notice that there are always 3 circles (3 scoops of ice cream) and
4 arrows (we need to move 4 times to go from the 1st to 5th con-
tainer). So (being general here) there are r + (n − 1) positions, and
we want to choose r of them to have circles.
(r + n − 1)! r+n−1 r+n−1
= =
r!(n − 1) r n−1
(3 + 5 − 1)! 7!
= = 35
3!(5 − 1) 3!4!
There are 35 ways of having 3 scoops from five flavors of ice cream.
Probability that, from a random choice, I get C-C-C?
1
35
35 / 65
Probability rules: Complement rule
P (A) = 1 − P (A)
36 / 65
Probability rules: Addition rule
P (A ∪ B) = P (A) + P (B) − P (A ∩ B)
P (A ∪ B) = P (A) + P (B)
37 / 65
Probability rules: Addition rule
38 / 65
Probability rules: Addition rule
39 / 65
Conditional probability
Consider a pair of events, A and B. Suppose that we are con-
cerned about the probability of A, given B. This problem can be
approached using the concept of conditional probability.
Let A and B be two events. The conditional probability of event A,
given that event B has occurred, is denoted by the symbol P (A|B)
and is found to be as follows:
P (A ∩ B)
P (A|B) =
P (B)
Provided that P (B) > 0
Similarly
P (A ∩ B)
P (B|A) =
P (A)
Provided that P (A) > 0
40 / 65
Conditional probability
Example: A cell phone company found that 75% of all customers
want text messaging on their phones, 80% want photo capability,
and 65% want both. What are the probabilities that a person who
wants text messaging also want photo capability and that a person
who wants photo capability also wants text messaging?
Probability that a person who wants photo capability also wants text
messaging is the conditional probability of event A, given event B
is
P (A ∩ B) 0.65
P (A|B) = = = 0.8125
P (B) 0.80
The probability that a person who wants text messaging also wants
photo capability:
P (A ∩ B) 0.65
P (B|A) = = = 0.8667
P (A) 0.75
41 / 65
The multiplication rule of probabilities
P (A ∩ B) = P (A|B)P (B)
And also as
P (A ∩ B) = P (B|A)P (A)
42 / 65
The multiplication rule of probabilities
0.65
P (A|B) = = 0.8125
0.80
is multiplied by the probability of photo capability, we have the joint
probability of both messaging and photo capability:
P (A ∩ B) = (0.8125)(0.80) = 0.65
43 / 65
Contents
1 Introduction
3 Bivariate Probabilities
Bayes Theorem
44 / 65
Bivariate Probabilities
45 / 65
Bivariate Probabilities
46 / 65
Bivariate Probabilities
B1 B2 ... Bj
A1 (A1 ∩ B1 ) (A1 ∩ B2 ) ... (A1 ∩ Bj )
A2 (A2 ∩ B1 ) (A2 ∩ B2 ) ... (A2 ∩ Bj )
. . . . .
. . . . .
Ai (Ai ∩ B1 ) (Ai ∩ B2 ) ... (Ai ∩ Bj )
Table 2: Contingency Table
47 / 65
Bivariate Probabilities
48 / 65
Contingency Table
49 / 65
Decision Tree
50 / 65
Joint and Marginal Probabilities
51 / 65
Decision Tree
52 / 65
Decision Tree
53 / 65
Conditional Probabilities
P (A1 ∩ B1 ) 0.04
P (A1 |B1 ) = = = 0.15
P (B1 ) 0.27
54 / 65
Independent events
We can also check whether or not paired events are statistically in-
dependent. Recall that event Ai and Bj are independent if and only
if their joint probability is the product of their marginal probabilities.
55 / 65
Practical Example
Suppose that in a best out five tournament, Sevilla F.C. has a 55%
chance of winning any game. Solve the probabilistic tree by solv-
ing the conditional probabilities at each node and the unconditional
probability that this particular team will win the series.
• What is the unconditional probability that this team will
become champion?
• Provided that the team wins the first two games, what is the
updated probability they the team wins the whole series?
• Provided that the team actually loses the first two games,
what is the updated probability they the team wins the whole
series?
• Provided that the team loses the first game but wins the
second game, what is the updated probability that the team
wins the series?
56 / 65
Bayes Theorem
P (Aj )P (B|Aj )
P (Aj |B) = Pn
i=1 P (Ai )P (B|Ai )
P (Aj )P (B|Aj )
P (Aj |B) =
P (A1 ) ∗ P (B|A1 ) + P (A2 )P (B|A2 )
57 / 65
Bayes Theorem
58 / 65
Bayes Theorem
P (A1 )P (B|A1 )
P (A1 |B) =
P (A1 ) ∗ P (B|A1 ) + P (A2 )P (B|A2 )
0.05 ∗ 0.90
= 0.24
0.05 ∗ 0.90 + 0.95 + 0.15
59 / 65
Bayes Theorem
60 / 65
The Monty Hall Problem
21 Blackjack clip
We are going to solve The Monty Hall problem using Bayes’ theorem.
Doors A, B and C (no events, as we have seen before)
Conditions:
• Monty needs to open a door
• He can’t open the door with the car behind it or my door.
Let’s assume we pick door A, then Monty opens door B.
Monty wouldn’t open C if the car was behind C so we only need to
calculate 2 posteriors:
• P(door=A—opens=B), the probability A is correct if Monty
opened B.
• P(door=C—opens=B), the probability C is correct if Monty
opened B.
61 / 65
The Monty Hall Problem: Prior information
62 / 65
.
63 / 65
The Monty Hall Problem:
P (opens = B|door = C) = 1
63 / 65
The Monty Hall Problem:
64 / 65
The Monty Hall Problem: Posterior
65 / 65