Boingboing linked to a new free eBook on probability... in their writeup, the mention the Monty Hall problem. 3 doors... goats are behind 2 of them, and a new car behind the third. The player picks a door. Monty then opens one of the doors, revealing a goat. Should the player switch doors? (Assume an equal chance for the 3 doors to hold a car, and that Monty will pick one of the 2 goat doors at random if the player has already picked the car.)
July 4, 2006
The article mentioned that Marilyn vos Savant "encouraged her readers to simulate the game and draw their own conclusions"... Well, here's a simulation! You can modify the speed to run lots of simulations, "Wargames"-finale style. You can select always switch, never switch, or some probability of switching.
2020 UPDATE: Jim Holt's "When Einstein Walked with Gödel" provides one of the best summaries of why you should switch, and I feel I "get" it now in a way I don't remember if I did when I wrote this simulation:
Counterintuitively enough, the answer is that you should switch, because a switch increases your chance of winning from one-third to two-thirds. Why? When you initially chose door A, there was a one-third chance that you would win the car. Monty’s crafty revelation that there’s a goat behind door B furnishes no new information about what’s behind the door you already chose—you already know one of the other two doors has to conceal a goat—so the likelihood that the car is behind door A remains one-third. Which means that with door B eliminated, there is a two-thirds chance that the car is behind door C.So, "obviously" you had a 1/3 chance of the car at first, but a 2/3 chance you got it wrong. Switching after the reveal lets you safely jump from the side of the 1/3 chance to the 2/3 - or in other words IF that initial 2/3 chance was the right one from the outset THEN you will now definitely win! After a goat is revealed and you switch you can ONLY lose if you were going to win at first (back when your chances were 1 in 3) and vice versa.