A Intuitive Explaination of the Monty Hall Problem

2021-01-18 by xiaoguang

I’ve read the Monty Hall problem before in a text book, but I didn’t get a intuitive understanding except the mathmatical result by Bayes’ rule. Yesterday when I read the book of “Probabilistic Machine Learning: An Introduction”, I found the intuitive explaination by the author. It’s like an Aha moment, so I decided to note it down here.

The problem

According to the wikipedia doc, this problem came from a American game show and is named after its original host, Monty Hall.

In the game show, the challenger is facing 3 doors and a car is hidden behind them. The challenger is supposed to first choose one door, and then the host will do a favor by open the empty door from the rest of the two doors. Then the challenger is given a choice: to stick with the previous chosen door or switch to the other not opened door.

The math

Without loose of generality, let’s assume that the challenger chooses the first door and the host opened the third door. Now the challenger need to decide whether to stick with door 1 or switch to door 2.

Let’s assume:

  • Ci: car is behind door i
  • Dj: host opens door j as a favor

Now we can model the problem using Bayes’ rule:

  1. The probability of the car is behind door 1 given the host has opened door 3

    P(C1|D3) = P(D3|C1)P(C1)/P(D3)
  2. The probability of the car is behind door 2 given the host has opened door 3

    P(C2|D3) = P(D3|C2)P(C2)/P(D3)

Now, the challenger need to do some math and find the maximum one.

For P(C1|D3):

# the prior proability of `P(C1)` is `1/3`
P(C1) = 1/3

# the likelyhood, ie. the probability the host opens door 3 when the car is behind door 1, is:
P(D3|C1) = 1/2

# the probability of `P(D3)` is not important for comparison, but we still give it here:
P(D3) = P(D3|C1)P(C1) + P(D3|C2)P(C2) + P(D3|C3)P(C3) 
      = 1/2 * 1/3 + 1 * 1/3 + 0 * 1/3 = 1/2

# so the probability result is:
P(C1|D3) = 1/2 * 1/3 / (1/2) = 1/3

Apply the same calculation for P(C2|D3), the result is:

P(D3|C2) = 1
P(C2) = 1/3
P(C2|D3) = 1 * 1/3 / (1/2) = 2/3

As you can see, the challenger should switch to door 2.

Intuitive explaination given by the author

So how to understand the result? The way to think the problem correctly is:

what’s the influence on the result when the host opens one empty door?

The book says, imagine we give the user 1000 doors, and the host opened 998 doors. Now if you are the challenger will you:

  1. stick with the one you chosen at first, or
  2. switch to the one left by the host after he opened 998 empty doors?

I’ll do the switch.