# The Monty Hall Problem

I had occasionally seen the TV programme ‘Let’s Make a Deal’ hosted by Monty Hall, but it wasn’t until I read The Curious Incident of the Dog in the Night-time, an acclaimed novel by Mark Haddon (2003), that I realized the TV show had sparked an interesting and controversial question in probability.  The main character who narrates the story in the book is a boy with Asperger’s syndrome and an unusual talent for mathematics.  Among his varied and unconventional musings he describes the Monty Hall problem in which a contestant was asked to choose one of three doors in the hope of winning a car which was hidden behind one of them.  After the contestant had picked a particular door Monty Hall would open one of the two other doors revealing a goat.  He then asked the contestant if he wanted to switch to the other unopened door or stick with his original choice.  The boy gives two proofs, one based on probability theory and the other on a flow-chart depicting all the possible outcomes, to show that the contestant should always switch because the probability that the car is behind the other unopened door is 2/3.  What surprised me, however, were the boy’s quotations of actual remarks made by PhD mathematicians claiming the solution to be wrong!  It is understandable that a first intuitive reaction would suggest that a contestant faced with only two closed doors, one of them concealing a car, had a 50% chance of winning whether he switched or not.  But in fact the Monty Hall problem is an example of Bayesian theory where posterior probabilities affected by new evidence can sometimes yield counter-intuitive results that have, apparently, confused even professional mathematicians on occasions.

Further investigation led me to an interesting blog by Allen Downey where this problem and others involving Bayes’ theorem are discussed.  Downey also refers to the Wikipedia article on the Monty Hall problem which explores in great detail many variants of the basic problem.  I find it remarkable that the strategy for winning a car in a simple TV game-show has given rise to such profound investigations in probability theory.

There are no new results in the following article.  I have simply developed well-known solutions in my own words in order to clarify my understanding of the theory.

The Monty Hall Problem

There are three doors.  Behind one of them is a car.  Behind the other two are goats.  The contestant is asked to pick a door, which he does.  The host then opens one of the other doors behind which there is a goat, after which he asks the contestant if he wishes to switch his pick to the other unopened door or stay with his original choice.  What should the contestant do?

Part 1
Let the doors be labelled A, B and C, and let the corresponding events that the car is behind these doors be A , B and C respectively.  Denote the probability that the car is behind door A by P(A) etc. and suppose the contestant chooses door A and the host opens door B to reveal a goat.  Clearly 𝑃(𝐴) = 1/3.  Hence we may infer that P(Ã) = 1 − 𝑃(𝐴) = 2/3 where Ã is the event ‘not A’ (the car is not behind door A).  Thus, since the events A, B and C are mutually exclusive (the car can be behind only one door), we have

2/3 = 𝑃(Ã) = 𝑃(𝐵 ∪ 𝐶) = 𝑃(𝐵) + 𝑃(𝐶).

When the host opens door B to show there is no car there, the contestant knows that 𝑃(𝐵) = 0.  Hence from the equation above 𝑃(𝐶) = 2/3.

Thus we have P(A) = 1/3 and P(C) = 2/3 showing that the contestant should always switch his choice to the other unopened door.

Alternatively this result can be reached through Bayes’ Theorem, an approach that also prepares us for the more detailed investigation in Part 2.  Let 𝐸 denote the event of the host opening door B to reveal a goat. Then 𝑃(𝐸|𝐴) is the probability of him doing this knowing that the car is hidden behind door A.  Likewise, 𝑃(𝐸|𝐵) and 𝑃(𝐸|𝐶) are respectively the probabilities of the host opening door B when the car is behind doors B and C respectively.  It is obvious that 𝑃(𝐸|𝐵) = 0 (the car is there, not a goat!) and 𝑃(𝐸|𝐶) = 1 since he must open door B in this case (he cannot open C because the car is there, and door A, the contestant’s choice, always remains closed of course).  When the car is behind door A the host can randomly choose either door B or C as the one to open.  Thus 𝑃(𝐸|𝐴) = 1/2.  Bayes’ Theorem states that

𝑃(𝐴|𝐸) = 𝑃(𝐸|𝐴)𝑃(𝐴) / 𝑃(𝐸)

= 𝑃(𝐸|𝐴)𝑃(𝐴) / [𝑃(𝐸|𝐴)𝑃(𝐴) + 𝑃(𝐸|𝐵)𝑃(𝐵) + 𝑃(𝐸|𝐶)𝑃(𝐶)].

The denominator follows because, as stated earlier, the events A, B and C are mutually exclusive.  Substituting the values we obtained above, we obtain

𝑃(𝐴|𝐸) = (1/2 · 1/3) / [1/2 · 1/3 + 0 · 1/3 + 1 · 1/3] = 1/6 / 1/2 = 1/3.

Similarly

𝑃(𝐶|𝐸) = 𝑃(𝐸|𝐶)𝑃(𝐶) / 𝑃(𝐸) = (1 · 1/3) / 1/2 = 2/3.

Either one of these results infers the other, of course, since 𝑃(𝐴 ∪ 𝐶) = 1.

Part 2
Part 1 describes the simple approach to the problem in which no account has been taken of the host’s strategy in opening the doors.  Obviously if the car should be behind the door A chosen by the contestant, then the host could open either door B or door C, but if it were behind door C then he can only open door B.  The point is that the host’s role in selecting which door to open has not been used in the solution so far.

The host may have a habit of preferentially opening door B, rather than door C, when the car is behind A, say 75% of the time.  But if he randomly chooses between doors B and C then the probability that he opens door B is 50%.  In general we can say 𝑃(𝐸|𝐴) = 𝑝  where 𝑝 varies from 0 to 1. When 𝑝 = 0 the host never opens door B to reveal a goat, presumably because he knows the organisers of the game always place the car behind door B.  At the other extreme 𝑝 = 1 he always opens B in the knowledge that the car is never placed behind that door.

Using Bayes’ Theorem again and following exactly the same arguments given in Part 1, we deduce

𝑃(𝐴|𝐸) = 𝑝 · 1/3 / [𝑝 · 1/3 + 0 · 1/3 + 1 · 1/3] = 𝑝/( 𝑝 + 1).

Suppose first that 𝑝 = 1/2, i.e. that the host randomly selects door B as the one to open.  Then 𝑃(𝐴|𝐸) = 1/3 which is the result obtained in Part 1.  If door B is opened by the host 75% of the time, then 𝑃(𝐴|𝐸) = 75/175 = 3/7 implying that the contestant should still switch his choice to door C where the probability of winning the car is 4/7 compared with 3/7 if he sticks with his original selection of door A.  When 𝑝 = 0 it is certain that the host will not open door B and is therefore forced to open door C.  Moreover 𝑃(𝐴|𝐸) = 0 in this case, so the contestant will definitely win by switching to the unopened door, namely B.  Finally, if 𝑝 = 1 the host must open B leaving the possibility that the car is behind either A or C, and indeed 𝑃(𝐴|𝐸) = 1/2 when 𝑝 = 1.

In general we have 0 ≤ 𝑃(𝐴|𝐸) ≤ 1/2 over the range of values 0 ≤ 𝑝 ≤ 1 so that it always pays the contestant to switch to the unopened door (except for 𝑝 = 1 when there is no advantage gained or lost by switching).