Monday, September 01, 2008

Game Show Host problem


In the movie 21, Kevin Spacey brings up a math/logic/probability problem called the Game Show Host Problem.

In the movie the problem was described something like this: You are a contestant on a game show and you have to choose between three doors, one of which has a new car behind it. The other two doors have goats behind them. The game show host tells you to pick a door. You do so, at which point the game show host opens up one of the other two doors to show you a goat. The host then asks you if you would like to switch your choice to the other closed door. The question then is: Should you switch your choice, or should you stick with your original choice?

The answer in the movie was that you should switch, because you have a 2/3 chance of winning if you switch, and a 1/3 chance if you stick with your original choice. Mathematically that is correct (you can see an explanation here). But they left out an important assumption, which is that the game show host always asks you if you would like to switch doors. If the game show host's behavior is unpredictable, then the probability is unpredictable, but if we know that the host always asks if you want to switch doors, then you do have a 2/3 chance of winning by switching.

The simplest explanation I can come up with is that when you make your initial choice, you clearly have a 1/3 chance of being correct. Then, even after the game show host opens one of the doors, your initial choice still had a 1/3 chance of being correct, so the other door must have a 2/3 chance of being correct, since it's the only one left.

I was discussing the problem with my roommate after watching the movie. It's kind of a hard thing to grasp, because it seems like it should be a 50% probability either way. But it's not.

So, to "prove" the results, and also to prove how nerdy I am, I wrote a quick Perl program to simulate the results. I'm pretty rusty since I haven't done any programming to speak of in the last couple of years, so it took 150 lines when a good programmer could probably have done it in 15.

But sure enough, when running the program, you win approximately 2/3 of the time if you switch doors, and approximately 1/3 of the time if you don't switch. Check it out:

% ./goat_problem.pl --switch=true --iterations=10000000
Switching... Won 6667355 out of 10000000 Times!

% ./goat_problem.pl --switch=false --iterations=10000000
NOT Switching... Won 3333678 out of 10000000 Times!

7 comments:

Ben said...

that is confusing

Mark said...

That was very nerdy of you . . . and as a fellow nerd I can vouch that those probabilities are correct. Here's another way to think about it: There is a 1 in 3 chance that you selected the grand prize on your first try. Thus, there is a 2 in 3 probability that you did not. If the host were to say, "I won't show you anything, but you can either choose the side with 1 box or the side with two boxes," of course you would choose the side with two boxes. That is exactly what you are doing when you switch. You know that at least one of the two boxes has a goat, but knowing which one has a goat does not change the probability of your 2-box side also having the grand prize (probably a large salmon).

Kristin Coppee said...

What is the probability of winning the million dollars or at least half a million on Deal or No Deal? I could really use the answer to that. Any mathematical ways of winning that show?

Anonymous said...

it is easier to think about it based upon the possibilities of what could happen. The only time you get screwed over by switching is if you chose the car on your first try and so when you switch doors you will get a goat. However you only have a 1/3 chance of picking the car on the first try, so getting screwed by switching only has 1/3 probability of occurring. Thus, you have a 2/3 chance of not picking the car on the first try, so when you switch you will get the car.

Chris Blaisdell said...

But your program and it's conclusion is based upon the faulty proposition that the probability of the second decision ( the decision whether or not to change ) is in any way related to the initial decision ( which door to open in the first place). They are 2 separate and unrelated random choices, and cannot be evaluated in the same equation.

If you roll a theoretical three sided die, and it lands on side 1, what are the chances that you will roll side 1 again. If you base your equation on the probability of rolling 2 side 1s in a row, you will get a different and Wrong answer than the correct answer 1 in 3.

When the contestant makes the second decision, he knows there are 3 boxes, and he knows one of them is a goat, and 2 are not.

At that point, the chances are 50 / 50.

His previous choice, and the choice of the host are wholly unrelated.

Anonymous said...

That's actually not mathematically confusing. The trick is that, actually, the game show host could have decided not to say "it's not here" if your initial choice was incorrect. If you assume that the game show host is trying to minimize your benefit, then you should probably stick to your guns - if your initial choice is right, the host can simply let you keep your first choice. I don't think there are any rules about that in game shows with that format...

Anonymous said...

Basicly it depends CAN the gameshow host open the door with the car behind it and does he always open a door.

If the host has no idea what door the car is behind and can open the door with the car behind it, then the 2nd choice makes no difference mathematically.

If the host cannot open the door with the car behind it then indeed you do have a 2/3 chance if you switch vs 1/3 chance if you do not.

If the host has the option NOT to open a door at all then indeed he could be trying to sway you to switch by opening a goat door, and so it migth be better NOT to switch.

If the hosts option of whether to open a door is completely random but he CANNOT choose the car door then it is best to switch.

If the hosts option of whether to open a door is completely random AND he has no idea what is behind any door then it makes no difference.