Search the atlas

The Monty Hall problem

Why does switching doors double your chance of winning? Trace the host’s choices, calculate the odds and see when the answer changes.

Should you stay or switch?

You pick one of three doors. The host, who knows what is behind each one, opens another door to reveal a goat. Two doors are still closed. Should you keep your original choice? In the classic Monty Hall problem, inspired by the American game show Let’s Make a Deal, switching wins with probability 2/32/3. Staying wins with probability 1/31/3. The host’s selection rule explains the difference.

The rules that determine the answer

One car and two goats are hidden behind the doors. Each location for the car is equally likely. You choose a door without knowing its contents. The host must always open an unchosen door with a goat behind it and must always offer you a switch. When the host can open either of two doors, the rule for breaking that tie matters if you condition on the particular door opened. The overall chance of winning by always switching remains 2/32/3.

Your original choice has probability 1/31/3 of hiding the car. The two unchosen doors together have probability 2/32/3. If the car is behind either of them, the host’s rule guarantees it will be behind the one that remains closed. Switching therefore wins exactly when your first choice was wrong.

Enumerate the cases

Fix your initial choice at door 1. The rows below have equal probability because each corresponds to one location for the car. A row is still a single case when the host can choose between two doors.

Location of car

Initial choice

Door the host can open

Stay

Switch

door 1

door 1

door 2 or door 3

win

lose

door 2

door 1

door 3

lose

win

door 3

door 1

door 2

lose

win

Calculate the conditional probability

Let CiC_i mean that the car is behind door ii, and let H3H_3 mean that the host opens door 3. Suppose the host chooses with equal probability when both doors are available. Then P(C1)=P(C2)=P(C3)=1/3P(C_1)=P(C_2)=P(C_3)=1/3 and

P(H3∣C1)=12,P(H3∣C2)=1,P(H3∣C3)=0.P(H_3\mid C_1)=\frac12,\qquad P(H_3\mid C_2)=1,\qquad P(H_3\mid C_3)=0.

By Bayes’ theorem and the law of total probability,

P(C1∣H3)=P(H3∣C1)P(C1)∑i=13P(H3∣Ci)P(Ci)=(1/2)(1/3)(1/2)(1/3)+(1)(1/3)+(0)(1/3)=13.P(C_1\mid H_3)=\frac{P(H_3\mid C_1)P(C_1)} {\sum_{i=1}^{3}P(H_3\mid C_i)P(C_i)} =\frac{(1/2)(1/3)}{(1/2)(1/3)+(1)(1/3)+(0)(1/3)}=\frac13.

Door 3 has been ruled out. The probability for door 2 is consequently P(C2∣H3)=2/3P(C_2\mid H_3)=2/3. Counting the two closed doors and assigning half the probability to each would discard how the host chose which door to reveal.

Imagine a hundred doors

With 100100 doors, your first choice has probability 1/1001/100 of being correct and the other 9999 doors have combined probability 99/10099/100. Suppose the host opens 9898 unchosen doors with goats and offers the single remaining alternative. The alternative wins whenever your first choice was wrong. Its winning probability is 99/10099/100.

Check the result by simulation

Place the car uniformly at random, make an uninformed first choice, then simulate the host’s selection among the eligible doors. For each round record whether staying and switching would win. Over many independent rounds their respective win rates approach 1/31/3 and 2/32/3. Opening an unchosen door at random, sometimes revealing the car, would simulate a different protocol. Switching improves the odds but never guarantees a win in an individual round.

What the host’s decision teaches about observing data

A test administered only to suspect components, a sensor that transmits only above a threshold, and an alarm suppressed during maintenance all produce selected observations. An absent signal can be informative when we know availability, sensitivity, filtering rules and how the channel can fail. Treating the observations as a random sample can distort both the inferred probabilities and subsequent maintenance priorities.

Model the underlying states, their prior probabilities, the selector’s rule and the probability of each observation given each state. A case table or a probability tree makes omitted branches easier to spot. An independent simulation checks the calculation when it implements the same protocol. Record changes to that protocol alongside the data. In an automated decision the costs of the possible errors also matter: maximizing the chance of success and minimizing expected loss can lead to different choices.

Conditional probability · Bayes’ theorem · Sample spaces · Partitions of a sample space · Classical probability · Monte Carlo methods · Worked examples on conditional probability and Bayes’ theorem

Back to contents