Kibbee.ca
icon
The Monty Hall Problem
Jeff Atwood of Coding Horror posted about the Monty Hall Problem. The problem basically goes like this. You are on a game show, where there are 3 doors. Behind 1 is a Car. Behind each of the other two, is a goat. You get to choose 1 of the three doors. After you choose a door, Monty Hall, the host of the show opens one of the remaining doors which he knows contains a goat, and gives you the choice to switch doors, or keep the door you've already chosen. Now the correct answer is that you should switch, but most people would say that it's 50/50 at this point, and that it doesn't make a difference if you switch. Jeff even pointed out that many mathematicians got this fact wrong when presented with the idea that it was better to switch, to illustrate why it's better to switch it helps to step through all possible solutions to the problem.

Let's say you have 3 doors, labelled A, B, and C, and that the car is located behind C. It could be located behind any door, but for demonstrative purposes we will say it's behind C. Because car starts with C.

Now let's go through all the options in order. If you choose A, which contains a goat, then Monty will have to open door B, which contains a goat, because he can't open door C. He never opens the door with the car. So now you have a choice to switch. If you switch, you choose C, and you win the car. If you choose to stick with door A, you lose. So that's 1 case where switching wins.

If you choose door B, which also contains a goat, then Monty will have to open A, again because he never opens the door with the car. If you switch, to C, you win the car. If you stick with B, you lose. So that's 2 cases where switching ends up winning you the car.

Now, if you choose Door C, which does contain the car, Monty can open up either A or B. It doesn't matter which door he opens. Now if you switch, you will lose. If you stick with door C, you win. So in this final case, the 1/3 chance where you actually picked correctly the first time, you win by not switching.

This works for whichever door you choose to place the car behind. In the end, if you choose to switch, you will win in 2/3 games, which is much better then the 1/2 games that most people would expect.
No Comments Posted