Let’s Make a Deal: A SAS Program to Play Monty Hall

The Monty Hall problem is a statistical puzzle loosely based on the game show Let’s Make a Deal, which was hosted by Monty Hall. Many websites discuss the Monty Hall problem, but the crux of the idPick a door, any doorea is that you are looking to win a prize that can be found behind one of three doors. The way the game works is this: You pick door number one, two, or three. The host, Monty Hall, then picks one of the other two doors that you did not pick, and tells you that there is no prize behind that door. He then offers you the chance to switch your choice or keep your original choice.

For example, if you pick door number one, Monty will tell you that the prize is NOT behind door number two. He then offers you the choice of sticking with door number one or switching to door number three. The crux of the statistical problem is whether it is a better choice to switch, to keep the same door, or that it does not matter. The seemingly intuitive answer is that it does not matter. The prize is either behind door one or door three, and you have no idea which one it is, so your chances are fifty-fifty.

This reasoning turns out to be incorrect. The answer is that it increases your odds of winning to switch. The thinking goes like this: If you pick door number one, there is a one-third chance the prize is behind that door, and a two-thirds chance it is behind the other doors (numbers two and three). You, therefore, have two groups: door one (one-third) and doors two and three (two-thirds). If Monty tells you there is no prize behind door number two, you still have two groups of one-third and two-thirds. Since there is only one door in the two-thirds group, there is now a two-thirds chance the prize is behind door three and there remains a one-third chance the prize is behind door one. It is best to switch to the other door (three).

If this baffles your mind, think of it this way. If there are 100 doors, and you pick door number one. You now know that there is a one percent chance the prize is behind door one and a 99 percent chance the prize is behind doors two through 100. Monty then opens doors two through 99 and shows you that they do not contain the prize, and asks if you wish to switch. In this case, the answer seems more obvious, and you would certainly believe the prize is behind door 100.

For those of you who have access to the SAS statistical software, I have attached a program to this post which plays the game 10,000 times and calculates your percentage of wins if you switch (the best strategy) each time. It then repeats the process of playing the game 10,000 times 100 total times, so in all it plays the game 1,000,000 times (100 rounds of 10,000 games). The program outputs the results to a pdf called ‘monty hall.pdf‘. I have also attached the pdf file if you do not have access to SAS. The results confirm the strategy in that your overall winning percentage is 66.67% if you switch to the other door every time. This is better than the fifty-fifty you would get if it did not matter if you switch or not.

  • Share/Bookmark

August 9, 2006 |   Posted in: Programming, Data and Metrics | Author: Charles | Print Print

Leave a Reply

You must be logged in to post a comment.


[ bbPress synchronization by bobrik ]

Switch to our mobile site