The Monty Hall problem
Behind one of three doors is a car, behind the other two are goats. You pick a door. The host, who knows where the car is, opens another door and shows a goat. Should you switch to the last closed door? Most people say it does not matter. It does: switching doubles your chance of winning, from 1/3 to 2/3. Click a door. Monty, who knows where the car is, opens another door with a goat. Then stay with your door or switch to the one he left closed. Switching wins two times out of three. Press Play automatically to let the computer play 1,000 games and watch the win rates settle at 1/3 and 2/3.
How it works
- Click a door. Monty opens another door with a goat behind it.
- Stay with your door or switch to the other closed door, and see what you won.
- Press Play automatically to run 1,000 games and watch the win rates settle at 1/3 for staying and 2/3 for switching.
Why switching wins
Your first pick is right with probability 1/3, and then switching loses. It is wrong with probability 2/3, and then the car is behind one of the two other doors. Monty must open the one with the goat, so the door he leaves closed hides the car. Switching wins exactly when your first pick was wrong: two times out of three.
The hundred-door version
Imagine 100 doors. You pick one, and Monty opens 98 of the others, all goats, leaving one closed. Would you stick with your 1-in-100 first guess? Switching now wins 99 times out of 100. With three doors the same reasoning gives 2/3. Try both with the Doors setting.
It depends on what Monty knows
The argument needs a host who knows where the car is and always opens a door with a goat. If Monty opens one of the other doors at random, he sometimes reveals the car and the game is spoiled. In the games where he happens to show a goat, staying and switching both win half the time. Choose Monty forgets where the car is and watch both bars settle at 50%.
A puzzle that fooled mathematicians
The puzzle is named after Monty Hall, host of the American game show Let's Make a Deal. It became famous in 1990, when Marilyn vos Savant answered it in Parade magazine: switch. Thousands of readers wrote in to say she was wrong, many of them with a doctorate. Even Paul Erdős, one of the most prolific mathematicians of the century, was only convinced when he saw a computer simulation.
Frequently asked questions
Should you switch in the Monty Hall problem?
Yes. Switching wins with probability 2/3 and staying with 1/3, as long as the host knows where the car is and always opens a door with a goat.
Why is it not 50/50 after a door is opened?
Because the host's choice is not random: he never opens your door and never the car. When your first pick is a goat, which happens 2/3 of the time, he is forced to leave the car closed. The two closed doors are not equally likely.
What happens if Monty does not know where the car is?
Then he sometimes opens the car by accident. In the games where he happens to open a goat, staying and switching each win half the time. Try Opens doors at random.
How many games does it take to see the 2/3?
After 100 games the win rates can still be ten or more percentage points off. After 1,000 games they are usually within about four points of 1/3 and 2/3, and after 10,000 games within one or two.
Does this upload anything?
No. Everything is calculated and drawn on a canvas in your browser. Save downloads a PNG. Edit opens that image in the PictorX editor.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Go to Editor