Monty Hall Simulator

Play the Monty Hall problem one round at a time, then run it ten thousand times and watch the win rate for switching settle at two thirds while staying settles at one third.

Works with any number of doors, and lets you compare a host who knows where the prize is against one who does not.

Last updatedHow we build & check our tools
Results will appear here once you enter your values.

Where the information actually comes from

The Monty Hall problem is famous because the correct answer feels wrong even after you have been told it. Switching doors wins two thirds of the time. Almost everyone first guesses one half, and a surprising number of people keep arguing for one half after seeing the proof. It helps to be precise about what the host is doing, because that is the part the intuition quietly gets wrong.

The host follows two rules. The host never opens the door you chose, and the host never opens the door hiding the prize. Neither rule is a matter of chance. When your first pick is wrong, which happens two times in three, the host has no freedom at all: there is exactly one losing door left to open, and the prize is forced to sit behind the door still closed. When your first pick is right, which happens one time in three, the host picks a losing door at random. Every time the host is constrained, the constraint tells you something.

  • You pick the prize first, probability 1/3. The host opens either losing door. Staying wins, switching loses.
  • You pick a losing door, probability 2/3. The host is forced to open the other losing door. Switching wins, staying loses.
  • There is no third case. Add the two together and switching wins in 2 of every 3 games.

Notice that the argument never mentions which door the host opened. That is why the odds do not become even when a door swings open. Your original door was picked when you knew nothing, and it is still a one in three guess. The other two doors held two thirds of the probability between them before the reveal, and they still hold two thirds afterwards. The reveal simply moves all of that onto the one door that survived.

The version of the game where switching does not help

Set the host to blind mode in the simulator and run ten thousand rounds. Switching now wins about half the time, and so does staying. Same doors, same reveal, completely different answer. Working out why is the most valuable ten minutes a class can spend on this problem.

A blind host opens a door without knowing what is behind it. Roughly a third of the time the host reveals the prize by accident, and there is nothing left to decide, so those rounds are thrown away. What remains is a set of rounds selected by the fact that the host got lucky, and within that set your door and the other door are equally likely to hide the prize. The reveal carried no information because it could just as easily have gone the other way.

The practical lesson generalises well beyond game shows. When someone shows you evidence, the question is not only what the evidence is, but what else could have been shown and was not. A result that was guaranteed to look this way tells you nothing. A result that could easily have looked different, and did not, tells you a great deal. In the real game the host could never have shown you the prize, and that guarantee is exactly what makes the surviving door worth two thirds.

Running it in a lesson

Simulation is the fastest route to belief here, but the order matters. Arguing first and simulating afterwards tends to produce a class that has heard the answer. Simulating first and arguing afterwards produces a class that wants the explanation.

  • Ask for a vote before anything runs. Stay, switch, or no difference. Record the numbers on the board so they can be compared at the end.
  • Play ten rounds by hand. The result will be inconclusive, which is the honest outcome and a good moment to talk about sample size.
  • Run ten thousand at slow speed. Watch the two lines separate within the first few hundred rounds and then flatten. The wobble at the start is as instructive as the flat part at the end.
  • Jump to 100 doors. This is where most of the remaining doubters change their minds. Nobody believes a one in a hundred guess was right.
  • Switch the host to blind. The advantage disappears. Ask the class what changed, given that the doors and the reveal look identical.
  • Return to the vote. Now ask for the explanation in one sentence. The target is something like: switching wins whenever the first guess was wrong.

The seed makes all of this repeatable. Write down the seed you used and every group in the room, and every class you teach afterwards, sees exactly the same run.

Why the chart wobbles before it settles

The convergence chart is a picture of the law of large numbers. Early on, one lucky round moves the running average enormously; later, the same round barely registers. That is why the two lines thrash about on the left of the chart and go almost flat on the right, and it is worth pointing out explicitly, because it is the same effect that makes small samples untrustworthy everywhere else.

The typical distance between the observed rate and the true rate shrinks in proportion to one over the square root of the number of rounds. For the switching strategy in the three door game, the rough size of that wobble is about 47 percentage points after 1 round, 4.7 after 100, 1.5 after 1,000, and 0.47 after 10,000. Two thirds of runs land inside those figures and about 95 percent land inside twice them.

  • Ten rounds proves nothing. A switching player loses five or more of ten about one time in five.
  • A hundred rounds is suggestive. Expect roughly 62 to 71 percent.
  • Ten thousand rounds is decisive. Expect roughly 65.8 to 67.6 percent, and no reasonable person watching will still argue for one half.
  • Getting ten times more precise costs a hundred times more rounds. That trade-off never goes away, in this simulation or in any experiment.

Frequently Asked Questions

Common questions about the Monty Hall Simulator

Because switching wins exactly when your first guess was wrong, and your first guess is wrong two times in three. With three doors you have a one in three chance of picking the prize straight away. If you did, switching loses. If you did not, and that happens two thirds of the time, the host is forced to leave the prize behind the one door still closed, so switching wins. Staying is a bet that your first guess was right. Switching is a bet that it was not, and the second bet is twice as good.