Monty Hall Problem
Three doors hide one car and two goats. After you pick, the host opens a goat door. Switching wins two-thirds of the time — try it yourself.
Switching wins when your first pick was wrong — which happens 2/3 of the time. The host’s reveal is not random: it concentrates the 2/3 probability onto the one remaining closed door. Run the simulator to watch the rates converge.
What you are seeing
Your first pick wins with probability 1/3. The other two doors together hold the remaining 2/3.
The host knows where the car is and always opens a goat door. That action transfers the 2/3 probability to the remaining unopened door.
Switching wins about 66.7% of the time; staying wins about 33.3%. The simulation makes the gap visible.
Why it matters
Monty Hall is a memorable lesson in conditional probability and in how new information changes the value of a choice. It appears in interviews, game shows, and decision theory.
Complexity & details
One simulated round is O(1). Simulating N rounds is O(N), with error shrinking like 1/√N.
Frequently asked questions
Why doesn’t the host’s reveal make it 50/50?+
The host does not choose randomly; the host avoids the car. That biased action concentrates probability on the unopened door.
Does switching always win?+
No. It wins in about two-thirds of rounds, not every round. Probability describes long-run frequency, not a single outcome.