You pick door 1 out of three, one of which hides a car. The host, who knows where the car is, always opens a different door that has a goat and offers you a switch. He opens door 3. Using Bayes' rule, what is the probability that the car is behind door 2, and why is the host's knowledge important?

Probability and statistics, Conditional probability
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can set up the likelihood P(host opens 3∣car at i) correctly and apply Bayes' rule, rather than guessing '50–50'.

Key idea

The host's action is evidence whose probability depends on where the car is: P(opens 3∣car at 1)=12, P(opens 3∣car at 2)=1, P(opens 3∣car at 3)=0.

Steps

  1. Let Ci be 'car is behind door i', with prior P(Ci)=13. Let H3 be 'host opens door 3'. You hold door 1.
  2. Find the likelihoods. If the car is at 1, the host may open 2 or 3 with equal chance, so P(H3∣C1)=12. If the car is at 2, he must open 3, so P(H3∣C2)=1. If the car is at 3 he cannot open 3, so P(H3∣C3)=0.
  3. Total probability: P(H3)=13⋅12+13⋅1+13⋅0=12.
  4. Bayes' rule: P(C2∣H3)=P(H3∣C2)P(C2)P(H3)=1⋅1312=23. Also P(C1∣H3)=12⋅1312=13.
  5. Conclusion: switching wins with probability 23 and staying wins with 13. The posteriors sum to 1, as they should.
  6. Why the host's knowledge matters: if he opened a random door and it happened to show a goat, then P(H3∣C1)=P(H3∣C2)=12, and the posterior would be 12 each. The conclusion depends on the host's rule, not only on what was observed.

Common mistakes

How long your answer should be

Half a page; 3 minutes.

Last checked on 4 December 2026.

Read this

Previous in Probability and statistics: A classifier wrongly flags a transaction with probability p=0.003, independently, and it scores n=1000 transactions. How do you approximate the probability of at most 2 false flags, and why does the approximation work?
Next in Probability and statistics: What is the difference between MLE and MAP estimation, and how can you show that L2-regularised linear regression is MAP with a Gaussian prior?