Thursday, August 7, 2014

The Monty Hall Problem

Suppose you're on a game show, and you're presented with three closed doors. Behind one of the doors is a car, and behind the other two are goats. You pick a door, let's say door 1. Before opening that door, the host, Monty Hall, opens a different door, let's say door 2, revealing a goat, and asks you if you want to switch which door you choose. Should you switch?

Counter-intuitively, the standard answer is yes. There is a 2/3 probability that the car is behind door 3, and only a 1/3 probability that the car is behind door 1. I'll prove it with math.

Bayes theorem says. In English, the probability of a hypothesis H given a piece of evidence E is equal to the probability of the evidence given the hypothesis times the prior probability of the hypothesis divided by the prior probability of the evidence

Let's define a few variables. We'll say C1, C2 and C3 stand for the car being behind door 1, 2 or 3, respectively. We'll also say O1, O2 and O3 stand for Monty opening door 1, 2 or 3, revealing a goat.

So, what we're interested in finding is P(C3|O2) or P(C1|O2). So, let's plug our variables into the equation.


Ok, so what are each of those terms? Well, P(O2|C3) = 1. Monty can't open the door you chose, and he's not going to open the door with the car. That only leaves one option. P(C3) = 1/3. With no information, we have to assume there's equal probability for the car to be behind each door.

By the law of total probability,, since Monty can choose either door 2 or door 3. P(O2|C2) = 0, since Monty won't open the door with the car behind it. Thus

Plugging those numbers back into the equation, we get. By the same logic,.

Here's another way to think about it. When you pick door 1, it either has the car behind it (probability 1/3) or it doesn't (probability 2/3). When Monty opens door 2, it doesn't change those probabilities. There's still a 1/3 probability your door has the car, and a 2/3 probability your door doesn't have the car. Since door 2 now has a probability 0 of having the car, that means door 3 must have the whole 2/3rds.

But what's really interesting to me about the Monty Hall problem is that it's not just dependent on what Monty does, it's also dependent on why he does it. Everything I've said is true for the standard problem, in which Monty always opens a door, and always reveals a goat. But if those things change, Monty can perform exactly the same actions, and get exactly the same results, but we'll still get different probabilities.

For example, suppose Monty only opens another door if you picked the door with the car. You pick door 1, and Monty opens door 2, revealing a goat. Should you switch? In that case, you definitely don't want to switch, because Monty wouldn't have opened a door at all if you had guessed incorrectly the first time. In this case, P(O2|C3) = 0, so P(C3|O2) = 0, and P(O2) = P(O2|C1)*P(C1), so P(C1|O2) = 1.

Alternatively, suppose Monty always opens a door, but opens one of the two you didn't pick at random. Again, you pick door 1, and Monty opens door 2, revealing a goat. It's possible Monty could have opened door 2 and revealed the car, but not this time. In this case, the probability that the car is behind door 1 and the probability that the car is behind door 3 are both 1/2. The reason is that he's twice as likely to open a goat door if you've chosen the car door than if you had not chosen the car door, so you do get information about the door you chose.

You can also find that using Bayes' theorem as before. P(O2|C2) = 0, since the goat can't be behind the door with the car. P(O2|C1) = P(O2|C3) = 1/2, since there's a 1/2 probability that Monty will open door 2, regardless of which door the car is behind.


But what if you don't know what strategy Monty is following? What if all you know is that there's a car behind one of the three doors, you picked door 1 and Monty opened door 2, revealing a goat. Maybe he's making a decision based on one of the three strategies I just described. Maybe he's using some other strategy. How do you calculate the probabilities then? What decision should you make?

I honestly have no idea.

No comments:

Post a Comment