skip to content

In the Monty Hall problem, why does switching doors win two-thirds of the time?

level: juniorimportance: must knowfreq 64%

answer

  1. your first pick never improves
  2. the host knows and never reveals the car
  3. 1/3 stays put, 2/3 has to go somewhere
  4. two of three cases: host is forced
  5. picture 100 doors instead of three

basics

~20 s

Your first pick wins only one time in three, so two times in three the car is behind another door. The host, who knows where it is, opens a losing door and concentrates that 2/3 onto the single door left.

solid answer

~50 s

Split the world at the moment of your first choice. With probability 1/3 you picked the car, and with probability 2/3 it is behind one of the two doors you did not pick. The host then opens a losing door from that pair -- crucially, he knows what is behind them and never opens the car. That reveal gives you no information about your own door, whose probability stays at 1/3, but it collapses the whole 2/3 onto the single remaining unopened door. So switching wins 2/3 of the time and staying wins 1/3. In Bayes terms: if you picked door 1 and the host opened door 3, then P(open 3 | car behind 1) = 1/2 while P(open 3 | car behind 2) = 1, and that 2-to-1 likelihood ratio is exactly what doubles door 2's odds. The answer depends entirely on the host's rules, so state them.

code

python · 15 lines
python
import random

def play(switch):
    doors = [0, 1, 2]
    car = random.choice(doors)
    pick = random.choice(doors)
    opened = random.choice([d for d in doors if d != pick and d != car])
    if switch:
        pick = next(d for d in doors if d != pick and d != opened)
    return pick == car

trials = 100000
stay = sum(play(False) for _ in range(trials)) / trials
swap = sum(play(True) for _ in range(trials)) / trials
print(round(stay, 3), round(swap, 3))  # about 0.333 0.667

go deeper

for a junior

Know the answer is switch, that it wins two times in three, and be able to say in one sentence that your original door keeps its 1/3 because the host could always show a goat.

for a middle

Prove it, not just assert it: enumerate the three car positions or run the likelihood ratio, and state the host assumptions that the result depends on before you compute anything.

for a senior

Use it to make the general point that a posterior depends on the data-generating process. Show the random-host variant where the identical visible scene yields 1/2, and connect it to selection effects in real data.

for a principal

Treat it as a lesson about specifying how observations were selected before modelling them. Be ready to argue that an unstated collection rule is the hidden assumption that most often invalidates an analysis.

## The setup, stated precisely Three doors. One hides a car, two hide goats. You choose a door. The host then opens one of the other two doors, always revealing a goat, and offers you the chance to switch to the remaining closed door. Should you switch? The answer is yes: switching wins with probability 2/3, staying with probability 1/3. But this is only true under a specific set of host rules, and naming them is half of a good answer: 1. The host always opens a door (he is not choosing whether to make an offer based on what you picked). 2. The host knows where the car is and never opens it. 3. When your first pick happens to be the car and he has a free choice of two goat doors, he picks between them at random. Change any of these and the number changes. ## The one-line argument Your initial pick is correct with probability 1/3. That probability was fixed before any door was opened, and the host's action gives you no evidence about your own door, because he can always open a goat door no matter what you chose. So your door stays at 1/3, the remaining 2/3 has to live somewhere, and after the reveal there is exactly one other closed door to hold it. ## Enumerating the three cases Suppose you always pick door 1. Each car position has probability 1/3. - Car behind 1: host opens 2 or 3. Staying wins, switching loses. - Car behind 2: host must open 3. Switching wins. - Car behind 3: host must open 2. Switching wins. Two of the three equally likely cases reward switching. Notice where the asymmetry comes from: in two of three cases the host has **no choice** about which door to open, and that forced move is the information leaking into the game. ## The Bayes version Say you picked door 1 and the host opened door 3. Write `C_i` for the car being behind door i, each with prior 1/3. ``` P(host opens 3 | C_1) = 1/2 (free choice between doors 2 and 3) P(host opens 3 | C_2) = 1 (forced -- he cannot open your door or the car) P(host opens 3 | C_3) = 0 (he never opens the car) ``` Applying Bayes' rule: ``` P(C_1 | opens 3) = (1/3 x 1/2) / (1/3 x 1/2 + 1/3 x 1) = (1/6)/(1/2) = 1/3 P(C_2 | opens 3) = (1/3 x 1) / (1/2) = 2/3 ``` In odds form the prior odds of door 2 against door 1 are 1:1, the likelihood ratio for the observed reveal is 1 / (1/2) = 2, and the posterior odds are 2:1 in favour of switching. ## The variant that flips the answer Suppose the host does **not** know where the car is, opens one of the other two doors at random, and it happens to reveal a goat. Now `P(opens 3 and it is a goat | C_1) = 1/2`, `P(... | C_2) = 1/2`, and `P(... | C_3) = 0`. The two surviving cases are equally likely, so the posterior is 1/2 for each closed door and switching gains nothing. The physical scene on stage is identical -- your door closed, a goat visible, one door left -- but the probability is different because the **process that produced the evidence** is different. That is the deep lesson of the puzzle and the reason interviewers keep asking it: you condition on how the data was generated, not merely on what you see. A second variant: if the host opens a door only when your first pick was correct, switching always loses. If he opens one only when your pick was wrong, switching always wins. Without the host's rule the question has no answer at all. ## Why intuition fails, and how to fix it Most people reason 'two doors left, so it is 50-50'. That would be right if the two remaining doors had arrived at that state symmetrically. They did not: your door was protected from being opened by your choice, the other survivor was protected by the host's knowledge. The standard intuition pump is to scale up. With 100 doors, you pick one -- probability 1/100 -- and the host opens 98 goat doors, deliberately skipping one. Almost nobody thinks that is now 50-50; it is obvious that the host's single spared door carries the 99/100. Monty Hall is the same structure with the numbers shrunk until the asymmetry stops being visible. ## How to answer in the room Give the 1/3-versus-2/3 split first, state the host assumptions explicitly, then offer either the three-case enumeration or the Bayes calculation as proof, and finish with the random-host variant to show you understand that the answer hinges on the host's rule rather than on the number of closed doors.

  • What if the host forgets where the car is, opens a door at random, and it happens to show a goat?
    Then it really is 50-50 and switching gains nothing. The reveal now has likelihood 1/2 under both surviving hypotheses instead of 1/2 versus 1, so the likelihood ratio is 1 and the odds do not move. Same visible scene, different data-generating process, different posterior -- which is the whole point of the puzzle.
  • Where exactly does the information come from, if the host always shows a goat?
    From the cases where he had no choice. When your first pick is wrong -- two times in three -- only one goat door is available to him, so which door he opens is dictated by where the car is. That forced move is informative; the free choice he makes in the remaining one-third of cases is not.
  • How do you show the same result with 100 doors?
    You pick one door, so you are right with probability 1/100. The host opens 98 goat doors and leaves exactly one closed. Your door keeps its 1/100 because it was never at risk of being opened, so the surviving door carries 99/100. Switching wins 99 times in 100.

Imagine 100 doors: you pick one, and the host opens 98 goat doors, carefully leaving one closed. Your door is still the 1-in-100 guess you made blind; his spared door carries everything else.

saying these in an interview costs you the question

  • Says two doors remain so it must be 50-50
  • Ignores that the host knows where the car is
  • Claims the host's reveal updates your own door
  • Cannot state the host rules the answer depends on
  • Thinks the answer holds even for a random reveal

context