Monty Hall Problem Simulation

The Monty Hall problem is a famous probability puzzle based on a game show scenario:

  1. There are three doors. Behind one door is a car (prize), and behind the other two are goats (no prize).
  2. You select one door, but don't open it yet.
  3. The host, who knows what's behind each door, opens one of the remaining doors to reveal a goat.
  4. The host then offers you a choice: stick with your original door or switch to the other unopened door.

The question is: Should you switch doors or stay with your original choice?

This simulation demonstrates that switching doors gives you a 2/3 (66.7%) chance of winning, while staying with your original choice gives only a 1/3 (33.3%) chance. The left column shows what happens when you always switch doors, and the right column shows what happens when you always stay with your original choice. Run the simulation with different sample sizes to see how the probabilities converge to their theoretical values.

Strategy: Switch Door

Door 1
?
Door 2
?
Door 3
?
Not started

Strategy: Stay with Original

Door 1
?
Door 2
?
Door 3
?
Not started

Results

Switch Strategy 0%
0
Stay Strategy 0%
0

Total runs: 0