Foundations
Monty Hall Problem
Three doors, one car, two goats. You pick a door, the host reveals a goat behind another. Switching wins 2/3 of the time. Bayes theorem makes this precise.
Prerequisites
Why This Matters
The Monty Hall problem is a precise test of whether you understand conditional probability. Most people get it wrong on first encounter, including professional mathematicians. The error is always the same: confusing unconditional probability with conditional probability .
This confusion reappears throughout ML. Confusing priors with posteriors, ignoring conditioning information, treating marginal and conditional distributions as interchangeable. The Monty Hall problem is the simplest setting where this mistake is visible.
Setup
You face three doors. Behind one door is a car. Behind each of the other two doors is a goat. You pick a door (say door 1). The host, who knows what is behind every door, opens one of the remaining doors to reveal a goat (say door 3). The host then asks: do you want to switch to door 2?
Assumptions: the car is placed uniformly at random. The host always opens a door with a goat. The host never opens the door you picked. If the host has a choice of two goat doors, the host picks uniformly at random.
Formal Setup
Let denote the door hiding the car, and the door the host opens. You pick door 1. The host opens door 3.
We want : the probability the car is behind door 2 given that the host opened door 3.
Monty Hall Conditional Probability
The posterior probability that the car is behind door , given the player chose door 1 and the host opened door 3. Computed via Bayes theorem from the prior and the host's strategy .
Main Theorems
Monty Hall Switching Advantage
Statement
Let the player choose door 1 and the host open door 3. Then:
Switching to door 2 wins with probability . Staying with door 1 wins with probability .
Intuition
When you first pick, you have a chance of being right. That means there is a chance the car is behind one of the other two doors. The host then eliminates one of those two doors (always a goat). The entire probability concentrates on the remaining door.
Proof Sketch
Apply Bayes theorem. The prior is for . The likelihoods are:
- (host can open door 2 or 3, picks uniformly)
- (host must open door 3, since door 2 has the car and door 1 is chosen)
- (host cannot open door 3 if the car is there)
The marginal is .
By Bayes theorem:
Why It Matters
This is the clearest demonstration that conditioning on new information changes probabilities. The host's action is not random noise. It carries information because the host is constrained to never reveal the car.
Failure Mode
If the host opens a door at random (possibly revealing the car) and happens to reveal a goat, then switching and staying both give . The result depends on the host's strategy, not just the observed outcome. This is the same distinction that separates observational data from experimental data in causal inference.
Connection to Information Theory
The host's action reduces your uncertainty. Before the host acts, the car is equally likely behind any of three doors: entropy is bits. After the host reveals a goat, you are choosing between two doors with probabilities and : entropy is bits. The host provided about bits of information.
Common Confusions
The car is behind one of two doors so it must be 50-50
This is the most common error. There are two doors left, but they are not equally likely. The host's choice was constrained: the host could not open the car door. This constraint makes the problem asymmetric. The host's action is evidence about where the car is.
Unconditional vs conditional probability
Before the host acts, . After the host opens door 3, . The probability of the same event changed because you conditioned on new information. People who insist the probability "doesn't change" are confusing the prior with the posterior.
Canonical Examples
Simulation verification
Run 10,000 trials of the Monty Hall game. In each trial, place the car uniformly, pick door 1, have the host reveal a goat, and record whether switching wins. The fraction of switching wins converges to . This is a good exercise to convince yourself the math is correct when your intuition resists.
Exercises
Problem
Suppose the host always opens the highest-numbered available goat door (instead of choosing uniformly). You pick door 1 and the host opens door 3. What is now?
Problem
Generalize to doors, one car, goats. You pick a door. The host opens goat doors, leaving your door and one other. What is the probability that switching wins?
References
Canonical:
- Selvin, "A Problem in Probability" (letter), The American Statistician, 1975
- vos Savant, "Ask Marilyn" column, Parade Magazine, 1990
Current:
- Rosenhouse, The Monty Hall Problem, Oxford University Press (2009), Chapters 1-3
- Gill, "The Monty Hall Problem Is Not Not a Problem", Statistica Neerlandica (2011)
Next Topics
- Base-rate fallacy: another case where ignoring conditional probability leads to wrong conclusions
- Birthday paradox: combinatorial probability that defies intuition
Last reviewed: April 2026
Prerequisites
Foundations this topic depends on.
- Common Probability DistributionsLayer 0A
- Sets, Functions, and RelationsLayer 0A
- Basic Logic and Proof TechniquesLayer 0A