The Monty Hall problem is a famous probability puzzle based on an old television game show. You pick one of three doors, one hiding a car and two hiding goats. The host, who knows where the car is, opens another door that hides a goat and offers you the chance to switch. Most people think the odds are now 50-50, but switching wins two times out of three. This calculator generalizes the game to any number of doors and any number of doors opened by the host.
How the calculation works
- Chance of winning by staying = 1 ÷ n, because your first pick does not change
- Chance of winning by switching = (n − 1) ÷ (n × (n − 1 − k)), where k is the number of doors the host opens
- Advantage = switching chance ÷ staying chance
- Expected wins = chance × number of games
Example
In the classic game with 3 doors and 1 door opened, staying wins 33.33% of the time and switching wins 66.67%, which is 2 times better. Over 1,000 games, you expect about 333 wins by staying and 667 by switching, so 333 more wins from switching.
Why it works
Your first choice has a one-in-three chance of being right, and it keeps that chance. The remaining two doors together hold the other two-thirds. When the host opens a losing door among them, the whole two-thirds falls on the door that is left. The host’s knowledge is what makes the opened door informative. If you picture 100 doors with 98 opened, the intuition is clearer: your first pick was almost surely wrong, so the door left standing is almost surely the prize.
Good to know
The result depends on the rules. The host must know where the prize is, must always open a losing door, and must always offer the switch. If the host opens a door at random and happens to reveal a goat, the odds of staying and switching become equal. The puzzle caused a famous public debate in 1990, and many mathematicians first rejected the answer before simulations confirmed it. You can test it yourself with three cups and a coin.
Related tools
For other counter-intuitive results, try the birthday paradox calculator, and for conditional probabilities, Bayes’ theorem. The probability calculator covers independent events and the coin flip calculator covers repeated trials.