The Monty Hall problem was created by Steve Selvin and is a classic puzzle whose correct answer is counter-intuitive almost to the point of disbelief. As this page explains, even some of the most competent mathematicians of the 20th century refused to accept the correct answer to the Monty Hall problem for a long time.
Here is the statement of the problem :
Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the other two doors are goats. You pick a door, and the host, who knows what’s behind the doors, opens another door, revealing a goat. He then says to you, “Do you want to change your selection?” Is it to your advantage to switch your choice?
What does intuition tell us? After the host opens one door, revealing a goat, we are left with two closed doors, one hiding a car and the other a goat (50% chance of success either way), intuition would lead us to conclude that there is no difference in our chances of success if we switched doors or not.
If only life were that simple………….
I decided to look at the Monty Hall problem through the eyes of Bayes Theorem and see if I could arrive at the right answer. After all, this is exactly the kind of situation that Bayesian reasoning should help us resolve – there is a known prior probability, some new evidence is presented, and we need to calculate the posterior probability.
Lets first recall the expanded formula of Bayes Theorem:-
First I define my hypothesis H -> There is a car behind my door. I call this Hcbmd
Next I see some evidence E -> A goat is revealed behind another door. I call this Egbad
Now I apply Bayes Theorem…………….
What we are looking for is P(H | E) OR P(Hcbmd | Egbad) OR to put it in words, what is the probability that there is a car behind my door given new evidence that has revealed a goat behind another door.
1. First lets calculate the prior probability that H is true. This is the probability that there is a car behind my door before any evidence was presented. Since there are three doors,
it means that P(H) which I write as P(Hcbmd) = 1/3
2. This also implies that before any new evidence was observed, the prior probability that the car was NOT behind my door (meaning my hypothesis is false) = 1 – P(Hcbmd) = 2/3.
So, P(~H) which I write as P(~Hcbmd) = 2/3.
3. Now for the terms P(E | H) and P(E | ~H) in the formula above.
P(E | H) -> This is the probability that we would observe the evidence presented if our hypothesis were indeed true. In our case this is P(Egbad | Hcbmd)
P(E | ~H) -> This is the probability that we would observe the evidence presented if our hypothesis were false. In our case this is P(Egbad | ~Hcbmd)
Here is where it gets a little tricky. If you scroll up to the statement of the problem, you’ll notice that the gameshow host knows whats behind the doors. It would be senseless for the host to open the door that reveals the car, and so he would therefore ALWAYS open a door that was hiding a goat whether or not my door was hiding a car or a goat.
So irrespective whether Hcbmd were true or false, P(Egbad) would always be true.
So P(Egbad | Hcbmd) = 1 and P(Egbad | ~Hcbmd) = 1.
So plugging these values into the Bayes Theorem formula, we get
P(Hcbmd | Egbad) = 1/3 implies that the probability that there is a car behind my door given new evidence (a goat behind another door) = 0.3333
So I stand only 33.33% chance of winning a car if I stick to my chosen door. It follows easily that if I change my choice of door, my chances of success are now 66.66%
This calculation can be verified redoing the problem and modifying our our hypothesis H as the probability that there is a goat behind my door (given the new evidence). This should evaluate to 0.66 or a 66.6% chance that I will win a goat if I stick to my original choice of door. If you are learning Bayes Theorem, this is good exercise to try out.
And thus Bayes Theorem has corrected solved the Monty Hall problem. Just another useful application of the most powerful force in the universe.