Friday, September 13, 2013

The Monty Hall Problem

It's great to see pieces on familiar mathematics puzzles in the mass media, so I was pleased to see this article about the Monty Hall problem on the BBC News website.  However, I'm moved to write a little piece about this, because I think it uses a rather carelessly analogy.

A brief summary of the problem.  You're in a game show, and there are three doors; behind one of the doors is a prize, behind the other two is nothing (or possibly worse, a goat).  The procedure is as follows every time the game is played:
  1. you choose a door, say number 1 (but don't see what's behind it);
  2. the game show host, who knows where the prize is, opens one of the other two doors, say number 2, and reveals nothing;
  3. the host gives you the opportunity to either stick with your choice or door 1, or move to door 3;
  4. your choice is revealed.

The question is - should you stick, or switch, or does it make no difference?

The BBC video (with Marcus du Sautoy and Alan Davies) is very clear, and so is most of the article.  However the beginning includes a reference to Deal or No Deal: the reason I don't like this is that in Deal or No Deal the banker doesn't know where the money is.  As we will see, this point is absolutely critical to getting the right answer.

I won't go into too much detail here (there are lots of ways to explain this, have a look at the article), but the answer is that you should switch: to see this, note that the probability you chose the prize door in step 1 is clearly 1/3; in step 2, at some level you learn nothing, because the same thing always happens (the host opens a door to reveal no prize).  So the chance that you have the correct door is still 1/3, and therefore the chance that the remaining door has the prize must be 2/3.  It's not easy to understand at first, but it's all to do with the inevitability of what happens in step 2.

Suppose instead that the host doesn't know where the prize is, and just opens a door at random.  There's a 1/3 chance you originally chose the prize, in which case the host will definitely reveal nothing.  But there's a 2/3 chance you do not select the prize door, in which case there is a 50% chance the host will choose it instead.  If he does this, one assumes that the game is over and you lose.

Let's call the prize door A, and the other B and C, and write AB to mean that you choose door A, and the host chooses door B.  If you and the host both work at random, there are 6 equally likely possibilities:

AB, AC (should stick)
BA, CA (already lost)
BC, CB (should switch)

There's a 1/3 chance you lose immediately, but if you get to step 3, then in half of the instances you should switch, and half you should stick.  In other words, it doesn't make any difference to you chances of winning, it's 50-50.

In the original scenario though, the host never picks door A, so BA and CA are not allowed.
What happens in step 2 is completely inevitable, whereas if the host is as ignorant as you, there's a chance you'll learn exactly where the car is.
Instead, if you choose door B, then the host will definitely pick C, so BC 'absorbs' all the probability from BA; similarly CB from CA.  Now both BC and CB are twice as likely as each of AB and AC.

A friend of mine found the following generalisation helpful for understanding the problem.  Suppose there are 100 doors, and still only one prize.  You pick a door, and the host then opens 98 of the remaining 99 doors to reveal nothing.  Again, this outcome was inevitable, so there's still a 1% chance the door you chose hides the prize, and if you switch there's a 99% probability you find the prize.

(Thanks to Tim Cannings for suggesting this, and Aeron Buchanan for the generalisation.)


  1. It doesn't matter if the host knows.

    The scenarios BA, CA doesn't count, because the problem requires to ask you "stay or switch". That's why he knows, so we can creat the question. You could say if you wanted to that the host doensn't know and by chance he opens a goat.

    Here we go:

    I choose a goat, I switch, I win.
    I choose car, I switch, I loose.

    Chances of choosing goat, 2/3. So I win 2 out of 3 times.
    Chances of choosing car, 1/3. So, I loose 1 out of 3 times.

    Where you are wrong is that the cases AB and AC are the same. In both cases I choose the car (which is 1/3 of the time), I switch, I lose. Still 1/3 of the time. It doesn't matter if the host opens one time B and one time C. It is already under 1/3 of the time that I chose A.

    1. It's absolutely critical whether or not the host knows, since otherwise him opening the door in step 2 can't possibly provide any information about which of the other two doors to prefer! You can try simulating this to see what happens after a large number of repetitions, either with the host knowing or not knowing where the prize is.