How to play
- Pick a door. A car is behind one of the doors and a goat behind each of the others.
- The host opens a door. The host knows where the car is and opens one of the other doors, always one with a goat.
- Switch or stay. You may switch to the other closed door or keep yours. Then every door opens.
- Read the table. Each round is counted under the strategy you chose. The automatic buttons play 10, 100 or 1,000 rounds at once with one strategy.
- Choose ten doors to see the same thing more clearly. The host then opens eight doors with goats.
- The address bar keeps the number of doors. The rounds you played do not travel with a link.
The problem
You face three closed doors. A car is behind one and a goat behind each of the other two. You pick door 1. The host, who knows where the car is, opens door 3 and shows a goat. Then the host asks whether you want to switch to door 2.
Most people answer that it makes no difference, since two doors are left and the car should be equally likely to be behind either. Under the rules above that is wrong. Staying wins the car with probability 1/3 and switching wins it with probability 2/3.
Why switching wins two times in three
Your first pick finds the car with probability 1/3, because you know nothing when you choose. The host’s door does not change that, since the host can show a goat whatever you picked. So staying wins only when the first pick was right.
Switching wins in every other case. If your first pick was a goat, the host has to open the other goat door, and the car is behind the door that is left. A first pick on a goat has probability 2/3.
Going through the three equally likely places for the car, after you pick door 1, shows it:
| The car is behind | The host opens | Staying gives | Switching gives |
|---|---|---|---|
| Door 1 | door 2 or door 3 | car | goat |
| Door 2 | door 3 | goat | car |
| Door 3 | door 2 | goat | car |
Staying wins in one row of three and switching in two. A tree diagram of the same cases gives the same answer.
With Bayes’ theorem
The answer is an example of conditional probability. Write Ck for the event that the car is behind door k, and O for the event that the host opens door 3. You have picked door 1.
- If the car is behind door 1, the host chooses at random between doors 2 and 3, so P(O | C1) = 1/2.
- If the car is behind door 2, the host has to open door 3, so P(O | C2) = 1.
- If the car is behind door 3, the host never opens it, so P(O | C3) = 0.
The law of total probability gives P(O) = 1/3 · 1/2 + 1/3 · 1 + 1/3 · 0 = 1/2. Bayes’ theorem then gives
P(C2 | O) = P(O | C2) · P(C2) / P(O) = (1 · 1/3) / (1/2) = 2/3.
The door you can switch to now has probability 2/3, and your own door keeps 1/3. The host’s choice carries information, because the host never opens the door with the car.
With ten doors
With n doors the host opens n − 2 doors with goats and leaves one closed beside yours. Staying wins with probability 1/n and switching with (n − 1)/n. With ten doors that is 10% against 90%.
Here the reason is easier to see. Your first pick finds the car one time in ten. The host has then opened eight doors and avoided a single one. If the car was not behind your door, which happens nine times in ten, it is behind the door the host left shut.
Holds when
The answer 2/3 holds when the host knows where the car is, always opens a goat door you did not pick, and always offers the switch. When the car is behind your door, the host is assumed to choose at random between the two goat doors. Other rules give other answers:
- The host opens a door at random and happens to show a goat. Then both doors have chance 1/2, because the opened door could just as well have shown the car.
- The host offers a switch only when you picked the car. Then you lose every time you switch.
- The host prefers one door when free to choose. Then the answer depends on which door was opened. The probability for switching lies between 1/2 and 1, and it is never lower than for staying.
The game above plays the standard rules.
Where the problem comes from
The name comes from Monty Hall, host of the American television show Let’s Make a Deal. In this form the problem was first published by the statistician Steve Selvin, in a letter to The American Statistician in 1975. An equivalent problem with three prisoners had been described by Martin Gardner in Scientific American in 1959. It became widely known in 1990, when Marilyn vos Savant answered it in her Ask Marilyn column in Parade and advised the reader to switch. Thousands of readers wrote to say she was wrong, many of them with doctorates. Under the standard rules above, she was right.
The problem is also explained in the video Monty Hall Problem Explained on YouTube.
Sources: M. Gardner, “Mathematical Games”, Scientific American, October 1959; S. Selvin, “A Problem in Probability”, The American Statistician 29:1 (1975), p. 67; S. Selvin, “On the Monty Hall Problem”, The American Statistician 29:3 (1975), p. 134; M. vos Savant, “Ask Marilyn”, Parade, 9 September 1990; J. Tierney, “Behind Monty Hall’s Doors: Puzzle, Debate and Answer?”, The New York Times, 21 July 1991.