Académique Documents
Professionnel Documents
Culture Documents
Lecture 3
Lecturer: Ali Ghodsi
Notes: Ahmad Al-Shishtawy
October 5, 2007
Problem 13. We are given three coins: one has heads in both faces, the second
has tails in both faces, and the third has a head in one face and a tail in
the other. We choose a coin at random, toss it, and it comes heads. What
is the probability that the opposite face is tails?
Solution: Let H and N be the events that we saw a head and it is a normal
coin, respectively.
H = {Saw a head},
N = {N ormal coin}.
P (N | H) =
=
=
P (N H)
P (H)
P (N )P (H | H)
P (N )
1 1
1
3 2
=
1
3
2
In this problem, there is a tendency to reason that since the opposite face
is either heads or tails, the desired probability is 1/2. This is, however,
wrong, because given that heads came, it is more likely that the twoheaded coin was chosen.
Lesson learned: Proceed axiomatically and never follow your intuition.
Remark: P (A)P (B | A) = P (A B) = P (B)P (A | BA)
Multiplication Rule
Assuming that all of the conditioning events have positive probability, we have
n1
P (ni=1 Ai ) = P (A1 )P (A2 | A1 )P (A3 | A1 A2 ) . . . P (An | i=1
Ai ).
P (ni=1 Ai )
P (ni=1 Ai )
n1
= P (i=1
Ai )
n1
P (i=1
Ai )
...
n1
P (i=1
Ai ) P (ni=1 Ai )
P (ni=1 Ai ) = P (A1 A2 A3 ) . . .
n2
n1
P (i=1
Ai ) P (i=1
Ai )
P (ni=1 Ai )
P (ni=1 Ai )
P (ni=1 Ai )
n1
P (A1 A2 A3 )
P (i=1
Ai ) P (ni=1 Ai )
...
n2
n1
P (A1 A2 )
P (i=1 Ai ) P (i=1
Ai )
P (A1 A2 ) P (A1 A2 A3 )
P (A1 )
P (A1 )
P (A1 A2 )
P (A1 A2 )
...
P (ni=1 Ai )
n1
P (i=1
Ai ) P (ni=1 Ai )
n2
n1
P (i=1
Ai ) P (i=1
Ai )
n1
P (A1 )P (A2 | A1 )P (A3 | A1 A2 ) . . . P (An | i=1
Ai ).
Example 1.10. Three cards are drawn from an ordinary 52-card deck without
replacement (drawn cards are not placed back in the deck). We wish to
find the probability that none of the three cards is a heart. We assume that
at each step, each one of the remaining cards is equally likely to be picked.
By symmetry, this implies that every triplet of cards is equally likely to
be drawn. A cumbersome approach, that we will not use, is to count
the number of all card triplets that do not include a heart, and divide it
with the number of all possible card triplets. Instead, we use a sequential
description of the experiment in conjunction with the multiplication rule.
Solution: We define the events
A1
A2
A3
=
=
39
52
because there are 39 cards that are not red in a 52 card deck (3/4). If we
know that the first card is not heart then we are left with 51 cards, 38 of
which are not hearts
38
P (A2 | A1 ) =
51
similarly
37
P (A3 | A1 A2 ) =
50
and using the multiplication rule we have
39 38 37
P (A1 A2 A3 ) =
52 51 50
Example 1.11 A class consisting of 4 graduate and 12 undergraduate students
is randomly divided into 4 groups of 4. What is the probability that each
group includes a graduate student?
Solution: We define the events
A1
A2
=
=
A3 =
A =
= P (A1 A2 A3 )
= P (A1 )P (A2 | A1 )P (A3 | A1 A2 )
12 8 4
=
15 14 13
Example 1.12. The Monty Hall Problem. This is a much discussed puzzle, based on an old American game show. You are told that a prize is
equally likely to be found behind any one of three closed doors in front
of you. You point to one of the doors. A friend opens for you one of the
remaining two doors, after making sure that the prize is not behind it.
At this point, you can stick to your initial choice, or switch to the other
unopened door. You win the prize if it lies behind your final choice of a
door. Consider the following strategies:
1. Stick to your initial choice.
2. Switch to the other unopened door.
Which is the best strategy?
Solution: A simple solution is by using Figure 2. For example, if your initial
choice is 1 (inner circle) then the probability to win if you dont switch is
1/3 (shaded area on the middle circle). That is if the prize is behind door
1. While if you switch after door 2 or 3 is opened then the probability to
win is 2/3 (shaded area on the outer circle). This is because the probability
of the prize being behind door 2 or 3 P (2 3) = 2/3 but you know that
P (Opened) = 0 so P (closed) = 2/3 and P (initial choice) = 1/3 which
means that it is better to switch.
Inner Circle:
Your initial choice
2
2
Middle Circle:
Probability to win
if you dont switch
2
1
Outer Circle:
Probability to win
if you switch
Figure 2: The Monty Hall Problem. The shaded area shows the probability to
win.
Let Ai be disjoint events that form a partition of the sample space and assume
that P (Ai ) > 0, for all i. Then, for any event B, we have
P (B)
{W in if switch}
IP P
A1
B
A3
A2
and
P (IP P c ) = 2/3,
if initially picked prize but switched then
P (W | IP P ) = 0,
similarly
P (W | IP P c ) = 1
thus
P (W ) =
2
2
1
0+ 1=
3
3
3
Win if switch
Figure 4: Using the total probability theorem to solve the Monty Hall problem
Example 1.13. You enter a chess tournament where your probability of winning a game is 0.3 against half the players (call them type 1), 0.4 against
a quarter of the players (call them type 2), and 0.5 against the remaining quarter of the players (call them type 3). You play a game against a
randomly chosen opponent. What is the probability of winning?
Solution: Let Ai be the event of playing with an opponent of type i. We have
P (A1 ) = 0.5,
P (A2 ) = 0.25,
P (A3 ) = 0.25.
P (B | A2 ) = 0.4,
P (B | A3 ) = 0.5.
P (Ai )P (B | Ai )
P (B)
P (Ai )P (B | Ai )
ni=1 P (Ai )P (B | Ai )
Example 1.18. The False-Positive Puzzle. A test for a certain rare disease
is assumed to be correct 95% of the time: if a person has the disease, the
test results are positive with probability 0.95, and if the person does not
have the disease, the test results are negative with probability 0.95. A
random person drawn from a certain population has probability 0.001 of
having the disease. Given that the person just tested positive, what is the
probability of having the disease?
Solution: If A is the event that the person has the disease, and B is the event
that the test results are positive, the desired probability, P (A|B), is
P (A|B)
P (A)P (B|A)
P (A)P (B|A) + P (Ac )P (B|Ac )
0.001 0.95
=
0.001 0.95 + 0.999 0.05
= 0.0187.
=
Problem 9.* The inclusion-exclusion formula. Show the following generalizations of the formula
P (A B) = P (A) + P (B) P (A B).
1. Let A, B, and C be events. Then,
P (A B C)
. . . + (1)n1 P (nk=1 Ak ).
Problem 14. A batch of one hundred items is inspected by testing four randomly selected items. If one of the four is defective, the batch is rejected.
What is the probability that the batch is accepted if it contains five defectives?
Problem 15. Let A and B be events. Show that P (A B|B) = P (A|B),
assuming that P (B) > 0.
Modified Monty Hall Problem. Solve the Monty Hall problem again assuming that your friend randomly opens one of the two doors (without
making sure that there is no prize behind it). If the prize is behind the
door your friend picked then you start over the game.
Examples. Read examples 1.14, 1.15, and 1.16.