The Monty Hall problem
The Monty Hall problem
The Monty Hall problem
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Q250, <strong>Monty</strong> <strong>Hall</strong><br />
18 November 2011<br />
1 <strong>The</strong> Game<br />
<strong>The</strong> <strong>Monty</strong> <strong>Hall</strong> game goes as follows. <strong>The</strong>re are three doors; behind one of the doors is a car,<br />
and behind the other two are goats. First you pick one door and stand in front of it. <strong>The</strong>n <strong>Monty</strong><br />
(the gameshow host) will open one of the other two doors and show what’s behind it. And then<br />
finally you have to choose whether to stay with the door you first chose or whether to switch to<br />
another door. In either case, you get to keep what’s behind the door you pick the second time (and<br />
we assume you want the car).<br />
2 Formalizing the Game<br />
Let D be the set {a,b,c} of doors. Let C be a D-valued random variable, namely which door has<br />
the car. And let M be a D-valued random variable, namely the door that <strong>Monty</strong> opens. Assume the<br />
game is fair, so C will be a uniform distribution over D: Pr(C≡a)=Pr(C≡b)=Pr(C≡c)=1/3.<br />
Because the game is fair, we can assume you always pick door a the first time (because the <strong>problem</strong><br />
is symmetric, so the cases where you pick door b or c are the same modulo renaming the doors).<br />
If we assume that <strong>Monty</strong>’s choice is symmetric, then we can say that <strong>Monty</strong> always chooses<br />
door b (because choosing door c is symmetric). So the general question of whether to switch or<br />
not is to solve:<br />
argmax Pr(C≡x|M ≡ b)<br />
x∈D<br />
i.e., to determine whether Pr(C ≡ a|M ≡ b), Pr(C ≡ b|M ≡ b), or Pr(C ≡ c|M ≡ b) is largest,<br />
and then you move to the corresponding door. However, in specific instances of the game we may<br />
have a more restricted set of givens, since we’ll know more than we do in the general case.<br />
From what we know so far we can start with the following joint probability table.<br />
18 November 2011 1 of 5
Q250, <strong>Monty</strong> <strong>Hall</strong><br />
C≡a C≡b C≡c<br />
M ≡ a 0 0 0 0<br />
M ≡ b 1/2<br />
M ≡ c 1/2<br />
1/3 1/3 1/3 1<br />
That the margins for C are all 1/3 come from the fact that we assumed that C is a uniform<br />
distribution over D. And that the margins for M are 1/2 come from our assumption that the game<br />
is symmetric. We can relax the assumtion that doors b and c are symmetric, but that means we’ll<br />
have to rephrase the <strong>problem</strong> (below) to marginalize over whether <strong>Monty</strong> chooses b or c.<br />
In order to know anything more, we need to know something about the distribution of M. And<br />
herein lies the danger of making assumptions.<br />
3 <strong>The</strong> Problem<br />
Let’s say that when we’re playing the game, <strong>Monty</strong> opens door b and there’s a goat behind it (thus<br />
C≢b). Now, the question is, do you stay before door a or do you switch to door c?<br />
Because we know M ≡ b and C ≢ b, the <strong>problem</strong> is argmax x∈D Pr(C ≡ x | M ≡ b,C ≢ b);<br />
namely, is Pr(C≡a|M ≡ b,C≢b) or Pr(C≡c|M ≡ b,C≢b) bigger?<br />
4 Situation 1<br />
Let us assume that <strong>Monty</strong> doesn’t care whether we win or loose, so he just picks a door uniformly<br />
at random without regard for where the car is. Thus Pr(M ≡ b)=Pr(M ≡ c)=1/2.<br />
<strong>The</strong>refore, the joint probability is Pr(M≡ x,C≡ y)=Pr(M≡ x)∗Pr(C≡ y)=Pr(M≡ x)∗1/3.<br />
For x=a we have Pr(M ≡ x)∗1/3=0∗1/3=0, and for x=b or x=c we have Pr(M ≡ x)∗1/3=<br />
1/2∗1/3=1/6. Thus, we can fill in the table as follows.<br />
C≡a C≡b C≡c<br />
M ≡ a 0 0 0 0<br />
M ≡ b 1/6 1/6 1/6 1/2<br />
M ≡ c 1/6 1/6 1/6 1/2<br />
1/3 1/3 1/3 1<br />
To solve the <strong>problem</strong> we compute both probabilities. We’ll do the first one in excruciating<br />
detail, and the second one more briefly.<br />
18 November 2011 2 of 5
Q250, <strong>Monty</strong> <strong>Hall</strong><br />
Pr(C≡a|M ≡ b,C≢b)=<br />
Pr(C≡a,M ≡ b,C≢b)<br />
Pr(M ≡ b,C≢b)<br />
defn. conditional probability<br />
=<br />
Pr(C≡a∧M ≡ b∧(C≡a∨C≡c))<br />
Pr(M ≡ b∧(C≡a∨C≡c))<br />
partitioning of C≢b<br />
=<br />
Pr((C≡a∧M ≡ b)∨(C≡a∧M ≡ b∧C≡c))<br />
Pr((M ≡ b∧C≡a)∨(M ≡ b∧C≡c))<br />
distributivity<br />
=<br />
Pr(C≡a,M ≡ b)+Pr(C≡a,M ≡ b,C≡c)<br />
Pr(M ≡ b,C≡a)+Pr(M ≡ b,C≡c)<br />
by disjointness<br />
=<br />
Pr(C≡a,M ≡ b)+Pr(⊥)<br />
Pr(M ≡ b,C≡a)+Pr(M ≡ b,C≡c)<br />
a≠c<br />
=(1/6+0)÷(1/6+1/6) from the table<br />
=(1/6)÷(2/6) arithmetic<br />
= 1/2 arithmetic<br />
Pr(C≡c|M ≡ b,C≢b)=<br />
Pr(C≡c,M ≡ b,C≢b)<br />
Pr(M ≡ b,C≢b)<br />
defn. conditional probability<br />
=<br />
Pr(C≡c,M ≡ b)<br />
Pr(M ≡ b,C≡a)+Pr(M ≡ b,C≡c)<br />
partitioning, distributivity, disjointness<br />
=(1/6)÷(1/6+1/6) from the table<br />
=(1/6)÷(2/6) arithmetic<br />
= 1/2 arithmetic<br />
So in the case where <strong>Monty</strong> choses to open a door uniformly at random, it doesn’t matter<br />
whether we switch or not. This happens because in this case the random variables C and M are<br />
independent, so knowing that M ≡ b doesn’t give us any special information (beyond that C≢b).<br />
18 November 2011 3 of 5
Q250, <strong>Monty</strong> <strong>Hall</strong><br />
5 Situation 2<br />
Now, more realistically, let’s assume that <strong>Monty</strong> wants you to lose so that he can save money for<br />
his show. Since he wants us to lose, rather than picking a door uniformly at random (which might<br />
mean picking a door with the car), he will always pick a door with a goat.<br />
In this case we know that Pr(M≡ b| C≡ b)=Pr(M≡ c| C≡ c)=0. Without the assumption<br />
that <strong>Monty</strong>’s choice is symmetric, we can fill in the table as follows:<br />
C≡a C≡b C≡c<br />
M ≡ a 0 0 0 0<br />
M ≡ b 0 1/3<br />
M ≡ c 1/3 0<br />
1/3 1/3 1/3 1<br />
If we assume <strong>Monty</strong>’s choice is symmetric, then that will resolve the empty cells. Notably,<br />
the marginal probabilities of <strong>Monty</strong>’s choice are the same as in the first situation, even though the<br />
joint and conditional probabilities are quite different.<br />
C≡a C≡b C≡c<br />
M ≡ a 0 0 0 0<br />
M ≡ b 1/6 0 1/3 1/2<br />
M ≡ c 1/6 1/3 0 1/2<br />
1/3 1/3 1/3 1<br />
So now we can do the same computations as before, but using this new table.<br />
Pr(C≡a|M ≡ b,C≢b)=Pr(M ≡ b,C≡a)÷(Pr(M ≡ b,C≡a)+Pr(M ≡ b,C≡c)) see situation 1<br />
=(1/6)÷(1/6+1/3) from the table<br />
=(1/6)÷(3/6) arithmetic<br />
= 1/3 arithmetic<br />
Pr(C≡c|M ≡ b,C≢b)=Pr(M ≡ b,C≡c)÷(Pr(M ≡ b,C≡a)+Pr(M ≡ b,C≡c)) see situation 1<br />
=(1/3)÷(1/6+1/3) from the table<br />
=(2/6)÷(3/6) arithmetic<br />
= 2/3 arithmetic<br />
So in the case where <strong>Monty</strong> always chooses to open a door with a goat, we should always<br />
switch since that doubles our chances of winning. Ironically, in trying to make us lose, <strong>Monty</strong> gave<br />
us information which will help us win! This happens because in this case the random variables<br />
C and M are not independent, so knowing that M ≡ b gives us special information (beyond that<br />
C≢b).<br />
18 November 2011 4 of 5
Q250, <strong>Monty</strong> <strong>Hall</strong><br />
6 Situation 3<br />
We could imagine another case in which <strong>Monty</strong> wants us to win. (Maybe he’s trying to bankrupt<br />
the show for some reason.) In this case, whenever he can choose the door with the car he will. If<br />
we assume his choice is symmetric in the case where the car is behind door a, then we can fill in<br />
the table as follows.<br />
C≡a C≡b C≡c<br />
M ≡ a 0 0 0 0<br />
M ≡ b 1/6 1/3 0 1/2<br />
M ≡ c 1/6 0 1/3 1/2<br />
1/3 1/3 1/3 1<br />
But what about the case where he picks door b and there’s no car there? We can do the same<br />
computations as before, but using this new table.<br />
Pr(C≡a|M ≡ b,C≢b)=Pr(M ≡ b,C≡a)÷(Pr(M ≡ b,C≡a)+Pr(M ≡ b,C≡c)) see situation 1<br />
=(1/6)÷(1/6+0) from the table<br />
= 1 arithmetic<br />
Pr(C≡c|M ≡ b,C≢b)=Pr(M ≡ b,C≡c)÷(Pr(M ≡ b,C≡a)+Pr(M ≡ b,C≡c)) see situation 1<br />
= 0÷(1/6+0) from the table<br />
= 0 arithmetic<br />
If <strong>Monty</strong> will always show us the car when he can, we know that if he does not show the car<br />
then it must be behind door a, so we should always stay. Again, this is a case where C and M are<br />
not independent, so knowing M ≡ b gives special information (beyond that C≢b).<br />
18 November 2011 5 of 5