Saturday, August 18, 2007

A Tricky Math Question

Q. A host wants you to pick which of the 3 doors has a gift behind it. And only one door has the gift. You got to pick one door first. He will show you one of the remaining that has no gift behind it. Is it a smart move to switch your pick after the host shows you one of the no-gift door?

My first thought is the probability that the gift is behind my pick or the other door is equal. So it does not matter if I switch or not. But I was wrong. Here is the solution:

Let A be the event that the door you picked has a gift behind it; B be the event that the opened door has no gift behind it. So what we are interested in is the probability of A given on B, p(A|B).

According to the Bayes' Law:

p(A|B)=\frac{p(A)p(B|A)}{p(B)}

We know that P(A)=1/3, p(B|A)=1. p(B) is also 1 because the host will make sure the door he opens has no gift behind it. So the answer of p(A|B)=1/3.

An easier way to think about the question is to list out all the situations. Suppose you pick door 1:

Scenario I: 1 has the gift and 2 and 3 have no gift. So don't switch.
Scenario II: 1 has no gift, 2 has the gift, 3 was open. So switch.
Scenario III: 1 has no gift, 3 has the gift, 2 was open. So switch.


It is clear that by switching the door, you only have 1/3 chance not to get the gift. So switching is a smart move if the host reveals one of the remaining doors that has no gift.

p.s Thanks for Charlie who entertained me with this question and provided the solution.

No comments: