Monty Hall Problem Simulator

Compare staying and switching in the classic three-door probability puzzle with clear expected win counts and rates.

Monty Hall Problem Simulator
Choose a trial count to compare the long-run outcomes predicted by probability.

About the Monty Hall problem

The Monty Hall problem is a famous probability puzzle based on a television game-show scenario. Three closed doors hide one prize and two goats. You choose a door. The host, who knows where the prize is, then opens one of the other doors and always reveals a goat. You may keep your original choice or switch to the remaining closed door. Although two doors remain, their winning probabilities are not equal. Your first choice has a one-in-three probability of hiding the prize and a two-in-three probability of hiding a goat. The host's reveal does not improve the original choice because the host is constrained: he must avoid both your selected door and the prize. When your first choice is wrong, which happens two thirds of the time, the only other unopened door must contain the prize. Switching therefore wins whenever the initial choice was wrong, giving it a two-thirds success probability. Staying wins only when the first selection was correct, or about 33.3 percent of games. Switching wins when that selection was incorrect, or about 66.7 percent. This simulator displays expected counts that preserve those exact theoretical proportions as closely as whole trials allow. For 300 trials, staying accounts for 100 expected wins and switching for 200. Counts that are not divisible by three are rounded while keeping the total fixed. The puzzle feels counterintuitive because people often treat the host's action like an arbitrary door removal. If a random person opened a door and could accidentally reveal the prize, the information and conditional probabilities would differ. In the standard problem, however, the host always knows the prize location, always opens a goat door, and always offers the switch. Those rules carry information from the eliminated door to the remaining alternative. Another way to see the advantage is to imagine 100 doors. You choose one, with a one-percent chance of being right. The informed host opens 98 goat doors and leaves only your door and one other closed. It is much easier to recognize that the 99-percent probability that your first pick was wrong is concentrated on the single alternative. The three-door version follows exactly the same logic. A simulation illustrates long-run probability, not a guarantee for a short sequence. Switching can lose several games in a row, and staying can temporarily appear better. As the number of independent games increases, observed rates generally approach one third and two thirds. The strategic conclusion remains: under the standard rules, switching doubles the probability of winning from one third to two thirds.

Monty Hall examples

Expected outcomes demonstrate how the advantage scales with the number of games.

TrialsExpected winsInterpretation
3 gamesStay 1; switch 2The smallest complete group shows the one-third versus two-thirds split.
300 gamesStay 100; switch 200Switching produces twice as many expected wins.
1,000 gamesStay 333; switch 667Whole-number rounding keeps all 1,000 outcomes assigned.
30,000 gamesStay 10,000; switch 20,000Large counts preserve the same theoretical percentages.

How to use the simulator

  1. Enter the number of games you want to compare, from one to one million.
  2. Select Run Simulation to allocate the expected outcomes between the two strategies.
  3. Compare the win count and win rate shown for staying with your first door.
  4. Compare those values with switching to the remaining closed door.
  5. Increase the trial count to see that the theoretical one-third and two-thirds rates remain stable.

Monty Hall FAQ

Why is switching better?

Your initial door is correct only one third of the time. Switching wins in the other two thirds of games because the informed host removes the losing alternative.

After one door opens, are the odds fifty-fifty?

No, because the host deliberately opens a goat door and never chooses randomly among all doors. That informed action preserves the original one-third probability on your door.

Can staying win?

Yes, staying wins whenever the initial selection hides the prize. That occurs about one third of the time, so switching is advantageous but not guaranteed in any single game.

What assumptions does the solution require?

The host knows the prize location, always reveals a goat, never opens your chosen door, and always offers a switch. Changing those rules can change the conditional probabilities.

Why can short runs look different?

Random samples naturally fluctuate around theoretical probabilities. With more independent games, the observed proportions generally settle closer to one third and two thirds.