Monty Hall Problem Calculator
The Monty Hall problem is one of the most counter-intuitive puzzles in probability. You pick one of three doors, the host opens a goat door, and the question is: should you switch or stay? This calculator shows the exact win probability for each strategy, extends to any number of doors and revealed goats, walks through the Bayes theorem derivation step by step, and charts how the advantage of switching grows as more goat doors are revealed.
What is the Monty Hall problem?
The Monty Hall problem is a classic probability puzzle named after the host of the 1970s American game show "Let's Make a Deal." You face three doors. Behind one is a car; behind the other two are goats. You pick a door. The host, who knows where the car is, always opens one of the other doors to reveal a goat. He then offers you the chance to switch to the remaining closed door. Should you switch or stay? The mathematically correct answer is to always switch. Switching wins 2/3 of the time, while staying wins only 1/3 of the time. This result is famous for being deeply counter-intuitive: many people, including professional mathematicians when the problem was popularized by Marilyn vos Savant in 1990, initially insist the probability is 50-50 after the host reveals a goat. The key is that the host's action is not random - he deliberately avoids the car, and that constraint transfers probability to the door he leaves closed.
Why switching wins 2/3 of the time: the Bayesian explanation
Before the host acts, your chosen door has a 1/3 probability of hiding the car and the other two doors together have a 2/3 probability. The host then opens one of those two doors, but only a goat door. This action does not change the 1/3 probability on your door - your prior is locked in. The 2/3 probability that was spread across the two unchosen doors is now concentrated entirely on the single remaining closed door, because the host eliminated the goat from that group. Think of it this way: if you always stay, you only win when your first pick was right (probability 1/3). If you always switch, you win whenever your first pick was wrong (probability 2/3), because in that case the host is forced to leave the car door closed for you to switch to. The formula generalizes to n doors and k revealed goats: P(win | switch) = (n - 1) / (n x (n - 1 - k)), while P(win | stay) = 1/n, regardless of how many doors the host opens.
The generalized Monty Hall problem
The classic puzzle uses 3 doors and 1 revealed goat, but the logic extends naturally. With more doors and more revealed goats, the switching advantage can become enormous. If there are 10 doors and the host reveals 8 goats, staying wins only 10% of the time while switching wins 90% of the time - a 9x advantage. The reference table above shows how P(win | switch) and P(win | stay) change across common scenarios. Two constraints always apply: the host must reveal at least 1 goat door, and must leave at least 1 other closed door for you to switch to. So the number of revealed doors k must satisfy 1 <= k <= n - 2. Revealing n - 1 doors would leave you certain of where the car is, which eliminates the puzzle entirely.
Historical context and the vos Savant controversy
Marilyn vos Savant published the Monty Hall problem in her "Ask Marilyn" column in Parade magazine in September 1990. She correctly stated that the contestant should always switch. The response was extraordinary: vos Savant received roughly 10,000 letters, many from academics and PhDs, insisting she was wrong and that the probability was 50-50. Even after she published three follow-up columns defending her answer, the controversy continued. The error most critics made was treating the host's reveal as random information, equivalent to simply removing a door. But the host's deliberate avoidance of the car is the critical constraint. Psychologist Massimo Piattelli-Palmarini later described this as one of the most powerful examples of cognitive bias against probabilistic reasoning. When researchers ran physical simulations and classroom experiments, the 2/3 result was confirmed repeatedly. Today it is used as a standard teaching example in probability, Bayesian statistics, and cognitive science courses worldwide.
Monty Hall probabilities for common door counts
| Doors (n) | Revealed (k) | P(win | stay) | P(win | switch) | Switch advantage |
|---|---|---|---|---|
| 3 | 1 | 33.33% | 66.67% | 2.00x |
| 4 | 1 | 25.00% | 37.50% | 1.50x |
| 5 | 1 | 20.00% | 26.67% | 1.33x |
| 5 | 3 | 20.00% | 80.00% | 4.00x |
| 6 | 1 | 16.67% | 20.83% | 1.25x |
| 6 | 4 | 16.67% | 83.33% | 5.00x |
| 10 | 1 | 10.00% | 11.11% | 1.11x |
| 10 | 8 | 10.00% | 90.00% | 9.00x |
P(win | switch) and P(win | stay) for classic setup where 1 goat door is revealed. Switching is always better.
Frequently asked questions
Why is the probability not 50-50 after the host reveals a goat?
Because the host's action is not random. He always opens a goat door on purpose. Your initial door still has only 1/3 probability, because nothing the host does changes your prior choice. The other door absorbs the full remaining 2/3 probability. If the host had opened a door at random and happened to reveal a goat, the odds would shift - but in the classic problem the host has perfect knowledge and acts deliberately.
Does it matter which door the host opens?
No, not in the classic version. As long as the host always reveals a goat and always offers you the switch, the strategy of switching wins 2/3 of the time regardless of which specific goat door he opens. The number of the door is irrelevant; what matters is the host's constraint.
What if there are more than three doors?
The advantage of switching depends on how many doors exist and how many the host reveals. With n doors and the host revealing k goat doors, P(win | switch) = (n - 1) / (n x (n - 1 - k)). Revealing more goat doors makes switching dramatically more valuable. With 10 doors and 8 revealed, switching wins 90% of the time.
What if the host does not know where the car is?
If the host opens a door at random and happens to reveal a goat, the conditional probability of switching winning is exactly 1/2 - it truly becomes 50-50. The host's knowledge is essential. Without it, the reveal carries no useful information about which remaining door hides the car, so neither strategy is better.
How can I convince myself switching is better?
List all the possible starting scenarios. If you always stay: you win only when your first pick was right (1 out of 3 cases). If you always switch: you win whenever your first pick was wrong (2 out of 3 cases), because the host is forced to leave the car door for you. Alternatively, imagine the problem with 1,000 doors. You pick one, the host opens 998 goat doors, and one door remains. Clearly that door is very likely to have the car. The same logic applies at three doors, just less dramatically.
Is this related to the three-prisoner problem or other puzzles?
Yes. The Monty Hall problem is structurally identical to the Three Prisoners Problem posed by Martin Gardner in 1959 and to Bertrand's Box Paradox from 1889. All three share the same mathematical structure: a prior probability gets updated by constrained, non-random information from a knowledgeable agent. Bayes' theorem is the clean unifying framework for all of them.
Sources
- vos Savant, M. (1990). "Ask Marilyn." Parade Magazine. The original column and follow-ups that sparked the controversy.
- Selvin, S. (1975). "A problem in probability." The American Statistician, 29(1), 67-71. The first formal statement of the problem.
- Rosenhouse, J. (2009). The Monty Hall Problem: The Remarkable Story of Math's Most Contentious Brainteaser. Oxford University Press.