| Monty Hall Problem
The Notorious Brain-teaser Explained in Detail
 Among the most infamous of probability brain-teasers, the Monty Hall problem may hold the crown. A source of frustration for virtually everyone, it stands as perhaps the best example of the illogical nature of many problems involving uncertainty.Flirting With Disaster contains a detailed qualitative analysis of the problem, so there is no reason to repeat it here. However, simulation provides an alternative way of discovering the answer without having to reason it out. It is therefore a useful demonstration of the value of this tool to help us get to the bottom of many non-intuitive situations that might otherwise lead us astray.
The "Monty Hall" Problem Flirting With Disaster, page 43.

|
Imagine you are a game show contestant who must choose from one of three doors. Behind one is a valuable prize—a car—and behind the other two doors are goats. The probability of choosing the car is one in three. There are no tricks.
After you have chosen a door, the host—who knows where the car is hidden—points to a different door and opens it to show that there is a goat behind it. (He can always do this, of course, because there is one car, two goats, and three doors.)
The host then offers you a choice: You can stay with your original choice or switch doors to the other one remaining. What do you choose? There are obviously two choices, but the challenge of this problem is not just getting the right answer, but explaining why it is correct.
| The Answer Via Simulation
There are a variety of ways to set up a simulation that will reveal that switching doors is the superior strategy. In the one shown here, I let the computer randomly pick the door hiding the car and the contestant's guess. Based upon these random choices, a list of the doors the host might choose to open to reveal a goat is generated (opList), and one of these is selected randomly if there is more than one option. This determines the switch door (SwDoor) for the contestant. The result of one were to stick with one's original guess and the result if one switches can then be determined. Each row in the table represents one round of simulated play, although the table only shows 10 of this simulation's 350 runs. The graph at the left shows the cumulative results over multiple simulated games (shown as the probability of getting the car) if one follows an "always switch" strategy (blue) versus "always stick" strategy (red). It is clear that switching is superior. Its cumulative probability approaches 2/3, the theoretical value.
|