Monty Hall Paradox

Statistics
Total rounds0
Switch wins0
Switch win %
Stay wins0
Stay win %
100/s

🚪 Monty Hall Paradox

One of probability's most famous counter-intuitive puzzles: switching doors after the host reveals a goat wins two out of three times — not one out of two.

🔬 What It Demonstrates

When you pick door #1 (probability 1/3 of winning), the remaining two doors together hold probability 2/3. When the host opens one losing door, the entire 2/3 probability collapses onto the single remaining door — so switching wins with probability 2/3. Staying wins only 1/3. This is a concrete example of conditional probability and Bayesian updating: new information (the revealed door) shifts the probability distribution.

🎮 How to Use

In manual mode: pick a door, watch the host reveal a goat, then decide to switch or stay. In auto mode: select a strategy and set speed — the simulator runs thousands of rounds per second. Watch the "Switch wins %" converge toward 66.7 % and "Stay wins %" toward 33.3 %. The convergence chart shows how quickly the law of large numbers smooths out early variance.

💡 Did You Know?

The Monty Hall problem was posed by Steve Selvin in 1975 and popularised by Marilyn vos Savant in her 1990 Parade column. Her correct answer — switch — triggered thousands of letters from readers (including PhDs) insisting she was wrong. Even Paul Erdős, one of history's most prolific mathematicians, initially refused to believe the answer until shown a computer simulation. The problem is named after the host of the TV game show "Let's Make a Deal."

About this simulation

This simulation recreates the classic Monty Hall problem: a car hides behind one of three doors, you pick one, and the host then opens a different door revealing a goat before offering you the chance to switch. It models the game exactly — picks and prizes are drawn uniformly at random, the host only ever opens a losing door he is free to choose — letting you test the famous result that switching wins two thirds of the time. Running thousands of rounds shows the empirical rates converging by the law of large numbers.

🔬 What it shows

It demonstrates how conditional probability and Bayesian updating work. Your first door has a 1/3 chance; the host opening a known goat door transfers the remaining 2/3 onto the single other unopened door. In auto mode it records both the always-switch and always-stay outcomes for every random round, so the win percentages converge toward the theoretical 66.67% and 33.33%.

🎮 How to use

Use the Manual button to play a round: click a door (A, B or C), watch a goat be revealed, then press Switch or Stay. The Auto button runs the experiment continuously; the Speed slider sets the pace from 1 to 10,000 rounds per second. The stats panel and convergence chart track switch and stay win rates live, and Reset clears all counters.

💡 Did you know?

The puzzle was popularised by Marilyn vos Savant in 1990, whose correct answer drew roughly 10,000 letters of disagreement, many from people with doctorates. The mathematician Paul Erdős reportedly remained unconvinced until he saw a computer simulation much like this one.

Frequently asked questions

What is the Monty Hall problem?

It is a probability puzzle based on a TV game show. A prize sits behind one of three doors; you choose one, the host opens a different door to reveal a goat, and you may keep your door or switch to the last one. The counter-intuitive result is that switching wins about two thirds of the time, not half.

Why does switching win 2 out of 3 times?

Your initial pick has a 1 in 3 chance of being right, so there is a 2 in 3 chance the car is among the other two doors. Because the host always reveals a goat, that entire 2/3 probability concentrates on the single remaining unopened door. Switching therefore wins whenever your first guess was wrong, which happens two thirds of the time.

What do the controls and modes do?

Manual mode lets you play one round at a time by clicking a door and then choosing Switch or Stay. Auto mode runs the experiment automatically, with a Speed slider stepping through 1, 5, 20, 100, 500, 2,000 and 10,000 rounds per second. The statistics panel shows total rounds and both strategies' win counts and percentages, while Reset zeroes everything.

Is the simulation mathematically accurate?

Yes. Each round places the car and your pick uniformly at random, and the host opens only a door that is neither your pick nor the car. In auto mode it scores both switching and staying on the very same random layout, so the measured percentages are an honest Monte Carlo estimate that converges to the exact 2/3 and 1/3 values.

Does the host's knowledge change the answer?

It is essential. The 2/3 advantage holds only because the host knows where the car is and deliberately avoids it when opening a door. If the host opened a door at random and merely happened to reveal a goat, switching and staying would each win half the time, so the host's informed behaviour is what creates the bias.