Tuesday, July 01, 2008

Monty Hall problem

Heard about the Monty Hall problem? The problem has a interesting history with Marilyn vos Savant.
Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice? (Whitaker 1990)
Below is the explicit version which makes clear that the host does not offer the choice in his own best interest etc.
Suppose you're on a game show and you're given the choice of three doors. Behind one door is a car; behind the others, goats. The car and the goats were placed randomly behind the doors before the show. The rules of the game show are as follows: After you have chosen a door, the door remains closed for the time being. The game show host, Monty Hall, who knows what is behind the doors, now has to open one of the two remaining doors, and the door he opens must have a goat behind it. If both remaining doors have goats behind them, he chooses one randomly. After Monty Hall opens a door with a goat, he will ask you to decide whether you want to stay with your first choice or to switch to the last remaining door. Imagine that you chose Door 1 and the host opens Door 3, which has a goat. He then asks you "Do you want to switch to Door Number 2?" Is it to your advantage to change your choice? (Krauss and Wang 2003:10)
This is one of those counter-intuitive problems. The problem with 3 doors is the most common one and you can find the explanation to the solution on wiki. I will just summarize it below.

We have two events which are below.

e1. You choose a door.
e2. The host chooses a door with goat.

We are interested in p(e1) and p(e2): p(wining) = p(e1) * p(e2)

p(wining) = 1/3

1. p(wining by not switching) = *1/3 = 1/9
2. p(wining by switching) = *2/3 = 2/9

p(not wining) = 2/3

1. p(not wining by switching) = *1/3 = 2/9
2. p(not wining by not switching) = *2/3 = 4/9

So to answer the question, it is in your advantage to switch. In short, you would have probabilities like 1/n², (n-1)/n², (n-1)/n², (n-1)²/n².


Now, here is the interesting part for n doors. Try this with 100 doors, you choose one door (e1) and the host always opens up 98 doors (n-2) revealing goats (e2) and then offers you to switch.

For 100 doors, probabilities are 1/100², 99/100², 99²/100² i.e.

p(wining) = 1/100

1. p(wining by not switching) = *1/100 = 1/100²
2. p(wining by switching) = *99/100 = 99/100²

p(not wining) = 99/100

1. p(not wining by switching) = *1/100 = 99/100²
2. p(not wining by not switching) = *99/100 = 99²/100²

You see the impact of switching. By switching, you increase your odds of wining by a factor or 99 which is n-1 (comparing 1/100² and 99/100²). Also note that by switching, you can win or lose by the same probability (99/100²).

There is another variation for n doors, where the host opens up p doors (p <= n-2). In that case, p(wining by switching) = (n-1) * 1/n * 1/(n-1-p). Note that (n-1-p) is 1 when p=n-2 i.e. there is only one door to switch to and p(wining by switching) comes to (n-1)/n. When p is less than n-2, there are additional doors to switch to (i.e. with 1 additional door, p(wining by switching) decreases by factor 2), so p(wining by switching) decreases by (n-1-p) factor. When p=0 (e2 is where host opens no doors), you are back where you started - 1/n. When p = n-1, well, the host isn't going to give you the car like that easily, is s/he? The point is, when p decreases, the advantage by switching reduces.

I like the case of p = n-1. And the car is Lexus IS.

No comments:

Post a Comment