[Jprogramming] Monty Hall Problem
Carl Ledbetter
CarlL at Forethought.net
Mon Sep 4 11:56:02 HKT 2006
Although the simulation programs to solve the Monty Hall Problem are
interesting exercise, this particular problem is actually way too easy not
to do directly. No sense wasting computer cycles on this (unless its a
teaching or learning exercise, of course.) There are only three doors, and
there are, therefore, only 12 possible cases to consider, so you can list
just them. (And actually, there are only four distinct cases, since the
numbering of the doors is arbitrary, so whatever they are called on the
show, we could, for the purposes of analyzing the problem, 'number' them
with A for the door with the prize and then continue cyclically B, C, so
only the case with the Prize in A needs to be considered since the other
cases will by symmetric.)
Lets just do it. In what follows, we'll show all 12 cases, with the doors
numbered conventionally and the location of the Prize marked by P (prize),
the door you initially choose marked with C (choice), and the door Monty
shows you after your choice marked with M:
The Prize is behind Door 1 (Probability 1/3):
You pick Door 1:
Probability 1/3 Case 1 1PC 2M
3 You initially pick Door 1; Monty chooses Door 2 (Prob ½) (Total
Prob 1/3 * 1/3 * ½ = 1/18)
(2 subcases) Case 2 1PC 2
3M You initially pick Door 1; Monty chooses Door 3 (Prob ½) (Total
Prob 1/3 * 1/3 * ½ = 1/18)
You pick Door 2:
Probability 1/3 Case 3 1P 2C
3M You initially pick Door 2; Monty must choose Door 3 (Prob 1) (Total
Prob 1/3 * 1/3 * 1 = 1/9)
You pick Door 3:
Probability 1/3 Case 4 1P 2M
3C You initially pick Door 1; Monty must choose Door 2 (Prob 1) (Total
Prob 1/3 * 1/3 * 1 = 1/9)
The Prize is behind Door 2 (Probability 1/3):
You pick Door 1:
Probability 1/3 Case 5 1C 2P
3M You initially pick Door 1; Monty must choose Door 3 (Prob 1) (Total
Prob 1/3 * 1/3 * 1 = 1/9)
You pick Door 2:
Probability 1/3 Case 6 1M 2PC
3 You initially pick Door 2; Monty chooses Door 1 (Prob ½) (Total
Prob 1/3 * 1/3 * ½ = 1/18)
(2 subcases) Case 7 1 2PC
3M You initially pick Door 2; Monty chooses Door 3 (Prob ½) (Total
Prob 1/3 * 1/3 * ½ = 1/18)
You pick Door 3:
Probability 1/3 Case 8 1M 2P 3C
You initially pick Door 3; Monty must choose Door 1 (Prob 1) (Total Prob 1/3
* 1/3 * 1 = 1/9)
The Prize is behind Door 3 (Probability 1/3):
You pick Door 1:
Probability 1/3 Case 9 1C 2M
3P You initially pick Door 1; must choose Door 2 (Prob 1) (Total Prob
1/3 * 1/3 * 1 = 1/9)
You pick Door 2:
Probability 1/3 Case 10 1M 2C
3P You initially pick Door 2; must choose Door 1 (Prob 1) (Total Prob
1/3 * 1/3 * 1 = 1/9)
You pick Door 3:
Probability 1/3 Case 11 1M 2
3PC You initially pick Door 3; Monty chooses Door 1 (Prob ½) (Total Prob
1/3 * 1/3 * ½ = 1/18)
(2 subcases) Case 12 1 2M
3PC You initially pick Door 3; Monty chooses Door 2 (Prob ½) (Total Prob
1/3 * 1/3 * ½ = 1/18)
Of the twelve cases, you win the Prize by switching doors after Monty opens
a wrong one in cases 3, 4, 5, 7, 9 and 10, and lose a Prize you would
otherwise have had in cases 1, 2, 6, 7, 11, and 12. In other words, you win
by switching whenever you didnt pick the correct door in the first place,
which is a 2/3 probability event, and you lose by switching whenever you did
initially pick the right door, which is clearly a 1/3 probability event.
Alternately, you can just add up the probabilities at the end of each of the
cases. The sum of the probabilities for the cases where switching wins
(Cases 3, 4, 5, 7, 9 and 10) is 6 * 1/9 = 2/3, and the sum of the
probabilities of the cases where you lose by switching (Cases 1, 2, 6, 7,
11, and 12) is: 6 * 1/18 = 1/3.
NB. The key to the analysis is that Monty is forced to pick the only
possible remaining door whenever you didn't choose the right door
initiallyits the only door he can open without showing you the big Prize.
This is a way of showing directly that the issue is the conditional
probability of winning by not switching (the Prize is behind the door you
initially chose) given that it is not behind the one Monty opens. Its the
conditional probability part that messes people upMonty does the work for
you and you need the conditional probability to get the right answer.
But all of this is way too hard. The problem has an even easier analysis.
Much easier. Trivially easy. You cannot choose the door Monty opens in any
scenario (nor would you want tohe always chooses a door with a booby
prize). So you lose by switching only on the condition that you had chosen
the right door initially. Thats true no matter what else is true. And if
you do switch, in any scenario, there is only one door to switch to (Monty
opened the other one). So theres no choice when you do switch as to what
door you switch to (the only reason that the factor ½ appears in 6 of the
scenarios is that Monty has a choice, but you do not.) You dont need any
more analysisyou win by switching whenever you picked the wrong door to
start with, and lose whenever you picked the right door initially.
Therefore, the best strategy is to switch no matter what, since you cant
lose unless youve already chosen the right door, which is clearly a 1/3
chance. So 2/3 of the time you win by switching. Done.
Carl S Ledbetter
CarlL at Forethought.net
More information about the Programming
mailing list