Monty Hall Problem: Should You Switch? Simulate and See
Should you switch doors? Simulate and find out!
Educational Tool Only: This simulator demonstrates the famous Monty Hall probability puzzle for learning purposes. It does not predict real game show outcomes and should not be used for gambling or betting decisions.
Input Checklist
The Monty Hall problem simulator asks for two things: how many doors and how many trials. The classic setup is three doors — one hides a prize, the other two hide goats. After you pick a door, the host (who knows where the prize is) opens one of the remaining goat doors and offers you a switch. The simulator runs that scenario hundreds or thousands of times and tracks how often switching wins versus staying.
Start with 3 doors and 1,000 trials. Enable “simulate both strategies” so the tool runs a staying batch and a switching batch side by side. The chart that appears tells the whole story: the switch line settles near 67% and the stay line near 33%. Once you see it, bump the doors to 10 or 100 and watch the gap widen dramatically.
Why Your Gut Is Wrong
After the host opens a goat door, two doors remain. Most people look at those two doors and think “50/50.” It feels like a coin flip. But the two doors did not arrive at this moment by the same path, and that history matters.
When you first picked, you had a 1-in-3 chance of being right. That means there was a 2-in-3 chance the prize was behind one of the other doors. The host then opens a goat door — but the host already knew which door hid the prize and deliberately avoided it. That action doesn't split the 2/3 evenly; it funnels the entire 2/3 onto the single remaining door. Switching gives you access to that concentrated probability.
This is conditional probability in action. Your posterior odds after the host reveals a goat are not the same as your prior odds. The host's reveal is not random — it's informed — and that information is what makes switching the better bet. Formally, you're performing a Bayesian update: your prior (1/3 on your door, 2/3 on the field) gets updated by the evidence (host always avoids the prize), and the posterior concentrates on the switch door.
Step by Step
Walk through a single round with three doors. Suppose the prize is behind Door 2 and you pick Door 1:
Now imagine the prize is behind Door 1 (your original pick). The host opens either Door 2 or Door 3 — doesn't matter which. You switch and lose. That happens 1/3 of the time. The other 2/3 of the time, the prize is behind a door you didn't pick, and the host helpfully eliminates the other wrong door, leaving the prize sitting in plain sight for anyone willing to switch.
Run 1,000 trials in the simulator and the numbers land close to these predictions: roughly 333 stay-wins and 667 switch-wins. The running average chart shows both lines wobbling early and stabilizing as trials accumulate — a textbook illustration of the law of large numbers.
Proof by Running It
Theory says switching wins (D − 1) / D of the time, where D is the number of doors. For 3 doors that's 2/3 ≈ 66.7%. The simulator runs a Monte Carlo test: generate a random prize location, a random player pick, have the host open all but one non-chosen goat door, then record whether switching or staying would have won.
The 100-door version is the thought experiment that convinces most skeptics. You pick one door out of 100. The host — who knows where the car is — opens 98 goat doors, leaving yours and one other. Would you really stick with your original 1-in-100 guess? Almost nobody would, and that instinct is correct. The same logic applies to 3 doors; it's just harder to feel at smaller scale.
What Surprises People
Thinking two doors means 50/50. The doors are not symmetric. Your door was chosen before the host acted; the other door survived because the host deliberately protected the prize. Equal count does not mean equal probability.
Forgetting the host knows. If the host opened a door at random and happened to reveal a goat, switching would genuinely be 50/50. The entire advantage comes from the host's knowledge. Remove it and the puzzle dissolves.
Confusing a single trial with a strategy. On any one round you might win by staying. That doesn't make staying a good strategy. Over many rounds, the 2/3 vs 1/3 split is ironclad. The simulator's running-average chart makes this viscerally clear: early wobbles even out into a stable gap.
Assuming the result doesn't scale. People accept the 3-door answer and then assume adding doors doesn't change much. It does — massively. Every extra door makes the initial pick less likely and the switch more powerful. At 100 doors, staying is a 1% strategy.
Variants Worth Testing
The ignorant host. If the host doesn't know where the prize is and opens a door at random, sometimes the prize is revealed and the game ends. Among games that continue (host happened to pick a goat), switching and staying are equally good. The information edge vanishes with the host's ignorance.
Multiple prizes. Hide two cars behind three doors and the calculus flips: staying wins 2/3, switching wins 1/3. The standard result depends on exactly one prize — extra prizes change the conditional probabilities entirely.
Many-door generalization. With D doors and one prize, the host opens D − 2 goat doors. Staying wins 1/D and switching wins (D − 1)/D. As D grows the ratio approaches 0% stay vs 100% switch — a clean limit that makes the underlying logic almost self-evident.
Using the simulator as a teaching demo. Run 10 trials live in front of a class and the results look noisy — someone will argue staying won more. Then run 10,000 and the lines converge. That contrast between small-sample noise and large-sample convergence is itself a lesson in statistical thinking, separate from the Monty Hall puzzle.
Sources
- Khan Academy — Monty Hall Problem — Step-by-step conditional probability explanation with visual aids.
- Britannica — Monty Hall Problem — Historical context, the Marilyn vos Savant controversy, and the formal proof.
- Statistics By Jim — Monty Hall — Statistical walkthrough with simulation results and variant analysis.
Frequently Asked Questions
Why does switching increase your chance of winning?
When you first pick a door, you have a 1/3 chance of being right and a 2/3 chance of being wrong. The host's reveal doesn't change this — it just concentrates the 2/3 probability (that you were wrong) into the remaining door. So when you switch, you're essentially betting that your original choice was wrong, which happens 2/3 of the time. Understanding this helps you see why switching doubles your win rate and why host knowledge creates the advantage.
Does Monty always know where the prize is?
In the standard Monty Hall problem, yes — the host always knows where the prize is and never accidentally opens the prize door. This is crucial! If the host randomly opened a door (and sometimes revealed the prize), the probabilities would be different. The host's knowledge is what makes switching advantageous. Understanding this helps you see when host knowledge is appropriate and when random host behavior would change the result.
What if Monty sometimes opens the prize by accident?
If the host randomly chose a door to open (sometimes revealing the prize), then switching would have no advantage over staying. The counterintuitive result depends specifically on the host knowing where the prize is and always revealing a goat. Different host behaviors lead to different optimal strategies. Understanding this helps you see why host knowledge is essential for Monty Hall problem and why different rules change the optimal strategy.
Isn't it 50/50 after the host opens a door?
This is the most common misconception! It seems like with two doors left, each should have a 50% chance. But the doors are not equally likely because of how we got here. Your original pick was made with 1/3 probability of being right, and the host's action doesn't change that. The remaining door inherits the 2/3 probability from all the non-selected doors. Understanding this distinction helps you see why conditional probability matters and why the doors are not equally likely.
What happens with more than 3 doors?
The same logic applies! With D doors, staying wins 1/D of the time and switching wins (D-1)/D of the time. For example, with 10 doors, staying wins 10% but switching wins 90%. The more doors, the more dramatic the advantage of switching becomes. Understanding this helps you see how switching advantage scales with number of doors and why the 100-door version makes the advantage obvious.
Can I use this simulator to make gambling decisions?
No! This simulator is purely for educational purposes to help understand probability concepts. Real game shows, casinos, and gambling scenarios have different rules, payouts, and odds. This tool should never be used to inform betting or gambling decisions of any kind. Understanding this helps you see when simulator is appropriate and when it should not be used for actual gambling decisions.
Why do my simulation results sometimes differ from the theoretical values?
Random variation! Even with fair probabilities, short-term results can deviate from expectations. This is normal and demonstrates the Law of Large Numbers — as you run more simulations, the results converge closer to the theoretical values. Try running 10,000+ games to see very close matches. Understanding this helps you see how to interpret simulation variation and why more trials improve accuracy.
Is this really how the TV show worked?
The actual 'Let's Make a Deal' show was more complex, with different game formats and rules. The Monty Hall problem as we know it is a simplified, idealized version that became famous through a 1990 column by Marilyn vos Savant. The mathematical puzzle assumes specific rules that may not exactly match the real show. Understanding this helps you see when Monty Hall problem applies and when real-world scenarios may differ.
What is conditional probability and how does it apply?
Conditional probability is the probability of an event given that another event occurred. In Monty Hall: probability prize is behind remaining door given that host opened goat doors. Host's action provides information, updating probabilities. The remaining door gets probability (D-1)/D because host's action concentrates probability from all other doors. Understanding conditional probability helps you see how information updates probabilities and why Monty Hall demonstrates this concept.
What is Bayesian reasoning and how does it relate?
Bayesian reasoning updates probabilities with new information: (a) Prior—initial probability of picking prize = 1/D, (b) Evidence—host opens D-2 goat doors, (c) Likelihood—host always avoids prize door, (d) Posterior—probability prize is behind remaining door = (D-1)/D. Monty Hall demonstrates Bayesian reasoning by showing how host's action updates probabilities. Understanding Bayesian reasoning helps you see how to systematically update beliefs with new information.
Related Probability Tools
Coin Flip & Random Events Simulator
Visualize probability convergence with coin flips
Birthday Paradox Simulator
Explore shared birthday probability in groups
Random Number Generator
Generate random numbers, dice rolls, and more
Probability Toolkit
Calculate combinations, permutations, and basic probability
Normal Distribution Calculator
Explore the bell curve and z-scores
Where Should I Go Next?
Get personalized travel destination suggestions
Disclaimer: This simulator is for educational and entertainment purposes only. It uses pseudorandom number generation to illustrate a classic probability puzzle. Results should not be used for gambling, betting, financial decisions, or any real-world wagering. Real game shows have different rules and outcomes.