Learning LabExplorable explanations
← All artifacts
Probability

Monty Hall

Once the host opens a goat door, switching feels like it cannot matter. Play the game, then run thousands of rounds and watch staying settle at 1/3 while switching settles at 2/3.

monty-hallprobabilityconditional-probabilitysimulation
LiveInteractive · drag, toggle, run it
Probability · Conditional reasoning

The Monty Hall Problem

Three doors, one car, two goats. You pick a door. The host, who knows what is behind each one, opens a different door to reveal a goat, then offers you the choice to stay or switch. Two doors are left, so it feels like a coin flip and switching should not matter. That intuition is wrong, and the rest of this page is built to show you exactly why.

Play a round
Seeded placement · seed 20260518
Pick a door. One hides a car, two hide goats.
Click a door above to begin.
Why it is not a coin flip

Say you always pick door 1. The car is equally likely to sit behind any door, so there are three equally likely worlds. The host is not free: it must open a door that is not yours and not the car. Trace each world and read off what stay and switch give you.

Prize behind door 1 (probability 1/3)
1
your pick
2
host opens
3
stays shut
Staywins
Switchloses
Prize behind door 2 (probability 1/3)
1
your pick
2
stays shut
3
host opens
Stayloses
Switchwins
Prize behind door 3 (probability 1/3)
1
your pick
2
host opens
3
stays shut
Stayloses
Switchwins

Staying wins only in the one world where your first guess was already right, which is 1 in 3. Switching wins in the other two worlds, where your first guess was wrong and the host was forced to clear away the only other goat, leaving the car behind the door you switch to. That is 2 in 3. The opened door is not new randomness: the host knew where the car was, so its choice carries information about the doors you did not pick.

Let the games settle it
thousands of simulated rounds

Each game runs the full rule: random car, random first pick, host opens goats it is allowed to open, then a fixed strategy decides. Run enough of them and the two rates pull apart toward 1/3 and 2/3. The black tick marks the theoretical value.

Always stay
no games yet · theory 33.3%
Always switch
no games yet · theory 66.7%
Run

With 3 doors your first pick is right only 33% of the time. The host then opens every goat door except one, so switching collects the whole rest of the probability: 67%. Push the slider to 100 and the gap is impossible to miss, which is the cleanest way to feel why switching wins.

The mistake, named

The 50/50 trap. Two doors remain, so it looks like even odds. That would be true if a door had been opened at random and happened to show a goat. It was not. The host always reveals a goat and never touches your door, so the reveal tells you nothing new about your own door: it was a 1 in 3 guess when you made it and it stays 1 in 3.

Where the missing 1/3 goes. The other two doors started with 2/3 of the probability between them. The host opens one of those two and shows it is empty, so its whole share collapses onto the single door left standing. Switch and you claim that 2/3.

The rule is everything. If the host did not know where the car was and opened a random door, the puzzle really would be 50/50 on the games where a goat happened to appear. The asymmetry comes entirely from a host who is constrained to avoid the car and avoid your door.

Prize placement comes from a seeded mulberry32 generator, not Math.random, so a given seed replays the same games. Win rates are counted from the simulated rounds.