Free Monty Hall Problem Simulator
Choose a strategy and number of simulations, then click Simulate
The Monty Hall Problem: A Probability Paradox
The Monty Hall paradox is a classic puzzle rooted in probability theory that often stumps even seasoned statisticians. At its heart, it demonstrates how conditional probability can drastically change the odds in a simple game‑show scenario. This Monty Hall Problem Simulator allows you to explore the paradox firsthand—either by playing a single round or running thousands of simulations—to see that switching doors consistently yields a two‑thirds chance of winning the car, while the intuitive belief in 50/50 odds is mistaken.
The Rules of the Game
The setup is straightforward. Three doors are presented: behind one is a car (the desired prize), and behind the other two are goats. The contestant picks a door, but does not open it yet. The host, who knows where the car is, then opens one of the remaining doors to reveal a goat. The host always opens a goat door—never the car. The contestant is then offered the chance to stick with the original door or switch to the other unopened door. The key question is: which action provides a higher probability of winning the car?
Why 50/50 Is a Fallacy
A gut‑level reaction is that after the host removes a goat door, only two doors remain, so each must have a 50% chance of hiding the car. However, this reasoning ignores the fact that the host’s action provides additional information. When the contestant originally chose a door, there was a probability that the car was behind that door and a probability that it was behind one of the other two doors. The host, by deliberately opening a goat door from the unchosen set, effectively consolidates that probability onto the single remaining closed door. Thus, switching wins with probability , while staying wins with probability . This surprising result is the essence of the Monty Hall Paradox.
A Brief History: Marilyn vos Savant’s Correct Answer
In 1990, Marilyn vos Savant—listed in Guinness World Records for the highest recorded IQ at the time—published the correct solution in her “Ask Marilyn” column in Parade magazine. She advised that switching doors doubles the chance of winning. Her explanation triggered an avalanche of letters, many from academics who insisted the odds were 50/50. Over time, simulations and rigorous proofs confirmed that vos Savant was right, and the Monty Hall problem became a celebrated example of how naive intuition can mislead even trained minds.
Conditional Probability Step by Step
To rigorously derive the probabilities, we use conditional probability. Suppose the contestant initially chooses door 1. We want to compute the probability that the car is behind door 1 given that the host opens door 2, i.e., . The conditional probability formula states:
The numerator is the probability that the car is behind door 1 and the host opens door 2. Since the car is equally likely to be behind any door, . If the car is behind door 1, the host can open either door 2 or door 3 with equal probability, so . Thus:
To find the denominator , we consider all three possible car locations:
- If the car is behind door 1: the contribution is (as above).
- If the car is behind door 2: the host cannot open door 2 (since it would reveal the car), so the probability is 0.
- If the car is behind door 3: the host has only one choice—door 2—so , and , contributing .
Therefore:
Plugging into the conditional probability formula:
The probability of winning by not switching (car behind door 1) is . The probability that switching leads to the car is the complement: . The same calculation holds for any initial choice and any door the host opens.
Bayes’ Theorem Confirms the Same Result
Another mathematically elegant way to reach the same conclusion is Bayes’ theorem. The theorem updates the prior probability with the likelihood of seeing the host open door 2 given each possible car location:
All the values are the same as above, yielding again. Because the prior is updated only with the information the host’s action provides, the posterior probability that the car is behind the other unopened door becomes . Thus, both approaches converge on the same strategic advice: always switch.
Simulating the Monty Hall Problem
The accompanying Monty Hall Problem Simulator puts these numbers to the test. You can either play a single interactive game or run a large number of simulated rounds.
- Single game mode: Choose a door, watch the host reveal a goat, then decide whether to stay or switch. The result is displayed immediately, illustrating the outcome in a concrete way.
- Simulation mode: Specify the number of iterations (e.g., 1,000 or 10,000) and pick a strategy—always stay or always switch. The simulator calculates the proportion of wins for that strategy, which should approach for staying and for switching as the number of trials increases.
This tool also serves as a conditional probability calculator, allowing you to see how the probabilities evolve after the host’s reveal. No matter how many times you test it, the results consistently reaffirm the paradox: switching is the rational choice.
Conclusion
The Monty Hall problem remains one of the most illuminating examples of conditional probability in action. By understanding and simulating the game, you can train your intuition to recognize that the host’s behavior changes the probability landscape. Whether you approach it with straightforward conditional probability, Bayes’ theorem, or empirical simulation, the answer is always the same—switch doors to double your chance of winning the car.
FAQ
1. Why does the probability of winning become 2/3 after switching doors, and not 1/2?
The key is that the host’s action provides information. Initially, your chosen door has a 1/3 chance of hiding the car. The other two doors collectively have a 2/3 chance. When the host deliberately reveals a goat among those two, the entire 2/3 probability transfers to the single remaining unopened door. Hence switching gives you a 2/3 chance, while staying retains only 1/3.
2. How can I use the Monty Hall Problem Simulator to verify the result?
The simulator offers two modes. In single‑game mode, you pick a door, see the host reveal a goat, and then decide to stay or switch. In simulation mode, you set the number of rounds and choose a fixed strategy (always stay or always switch). The tool then calculates the proportion of wins, which will approach 1/3 for staying and 2/3 for switching as the number of rounds increases.
3. Is Bayes’ theorem necessary to solve the Monty Hall problem, or is conditional probability enough?
Both methods work equally well. Conditional probability directly computes P(car behind chosen door | host opens another door). Bayes’ theorem reaches the same result by updating the prior probability with the likelihood of the host’s action. The simulator can be considered a conditional probability calculator that demonstrates the answer empirically.
4. Who originally solved the Monty Hall problem, and why was it controversial?
Marilyn vos Savant provided the first widely published correct solution in her 1990 Parade column. Although her reasoning was sound, many readers—including academics with PhDs—initially rejected it, believing the odds were 50/50. The controversy eventually subsided as simulations and mathematical proofs confirmed her answer.
5. Does the Monty Hall problem apply to any number of doors?
The classic version uses three doors, but the principle generalizes. With more doors, the advantage of switching becomes even larger, as the host removes many goat doors, leaving the unchosen door with the remaining probability. The simulator focuses on the standard three‑door scenario, which is the most famous illustration.
How to Use
- Choose your strategy: Always Switch or Always Stay.
- Select the number of simulations to run (more simulations give more accurate results).
- Click Simulate to run the Monty Hall simulation and see the win rates for your chosen strategy.