FanPost

OT: Monty Hall Simulation


INTRODUCTION:

I was intrigued by the discussion over the front page post about the Monty Hall Problem yesterday, and I thought that a simulation of the "game show" in question might help to demonstrate what is going on in the problem.  I constructed the simulation (using Excel and the Analysis toolpak plugin) to test whether changing your choice of doors after the host reveals an incorrect door is a good idea.  We will later perform the simulation with 50 iterations, and then 1,000 and 10,000.  The steps are as follows:

 

SIMLUATION STEPS:

***************************************************************************************

STEP #1:  Use a random number simulator to randomly select door #1, 2, or 3 as the door concealing the prize.

STEP #2:  Use a random number simulator to randomly select door #1, 2, or 3 as the door the contestant thinks conceals the prize.

STEP #3:  Use a random number simulator to randomly select one of the remaining doors as one of the doors the host "eliminates".  This number/door can not be the same number selected in either of the previous two steps.

STEP #4:  Change the contestant's choice to the door different than his initial choice and different than the one chosen by the host.

STEP #5:  Test whether the new door is the same as the prize door selected in Step #1.

***************************************************************************************

 

EXAMPLE (ONE ITERATION OF SIMULATION)

For example, an iteration of this simulation might go as follows:

STEP #1 STEP #2 STEP #3 STEP #4 STEP #5
Prize door # You choose door # Host shows door # Your new pick door # Did you win?  
(1=Yes, 0=No)
2 2 3 1 0

To preserve people's sanity, I won't write the Excel program codes used to ensure that the steps are effectively random and accurate.  I was able to check that all of the above conditions were fulfilled (i.e. making sure that choices that can't overlap don't in the simulation).  However, if you end up looking at the Excel file and have questions, I'd be happy to answer them.   

 

TRIAL RUN OF 50 ITERATIONS

The good news about using Excel is that, once the code has been written and verified, it is extremely easy to produce iterations.  Because we are limited by space, all that I will show here is a trial run of 50 iterations, which produced 33 successes (66%).  I give the results from runs with more iterations below, as well as a link to the simulation file:

STEP #1 STEP #2 STEP #3 STEP #4 STEP #5
Prize door # You choose door # Host shows door # Your new pick door # Did you win?  
(1=Yes, 0=No)
1 3 2 1 1
3 3 2 1 0
2 3 1 2 1
3 3 2 1 0
2 1 3 2 1
2 1 3 2 1
2 2 1 3 0
1 2 3 1 1
2 1 3 2 1
1 2 3 1 1
2 2 1 3 0
2 3 1 2 1
1 3 2 1 1
2 3 1 2 1
3 3 2 1 0
2 3 1 2 1
2 3 1 2 1
1 2 3 1 1
2 2 1 3 0
3 1 2 3 1
3 3 2 1 0
3 3 1 2 0
3 1 2 3 1
1 3 2 1 1
3 1 2 3 1
2 3 1 2 1
3 2 1 3 1
2 3 1 2 1
2 2 1 3 0
3 3 2 1 0
2 3 1 2 1
3 2 1 3 1
3 2 1 3 1
1 2 3 1 1
2 2 3 1 0
2 3 1 2 1
2 1 3 2 1
1 2 3 1 1
2 2 1 3 0
3 2 1 3 1
3 3 2 1 0
2 3 1 2 1
2 3 1 2 1
2 2 1 3 0
1 3 2 1 1
2 3 1 2 1
2 2 1 3 0
2 3 1 2 1
2 2 1 3 0
1 1 2 3 0


Our trial run produced a 66% success rate, which seems to support the theory that changing rooms gives you a 2/3 probability of winning.  However, 50 trials still allows for a high amount of random fluctuation.  We need to run more trials to ensure that random fluctuation is negligible (the Law of Large Numbers ensures that, in any experiment, the relative success/frequency in an experiment approaches the true probability as the number of iterations increase).
 

MORE ITERATIONS

Note: due to the randomness of these situations, each time the excel file is edited, the random numbers change, which in turn yields different (though similar results); the fluctuations will be greater for any runs with a small number of iterations (such as 50), and will shrink to a negligible amount for runs with sufficiently many iterations (such as 10,000).  Keep this in mind if you download the simulation .xls file (see below).

50 iterations yield 33 successes -- 66% success rate

1,000 iterations yield 673 successes -- 67.3% success rate

10,000 iterations yield 6,675 success -- 66.75% success rate

 

SIMULATION FILE

Download the simulation .xls file by clicking here.  You will need Excel with the Analysis Toolpak to read the file.  Feel free to use it and make changes.  I'd be happy to explain any of the techniques used to construct the simulation.

 

CONCLUSION

These numbers certainly suggest that 2/3 is indeed the correct probability, and that switching your choice is indeed the prudent decision.  Simulations, however, are not proof, no matter how many iterations, so this simulation should merely be viewed as evidence and support for the "switching doors" conjecture (solid evidence, no doubt, but still lacking in the sense of an actual proof).  (There is a theoretical proof, which several posters alluded to in the comments section of the original front page post.) 

X
Log In Sign Up

forgot?
Log In Sign Up

Forgot password?

We'll email you a reset link.

If you signed up using a 3rd party account like Facebook or Twitter, please login with it instead.

Forgot password?

Try another email?

Almost done,

Join Lone Star Ball

You must be a member of Lone Star Ball to participate.

We have our own Community Guidelines at Lone Star Ball. You should read them.

Join Lone Star Ball

You must be a member of Lone Star Ball to participate.

We have our own Community Guidelines at Lone Star Ball. You should read them.

Spinner

Authenticating

Great!

Choose an available username to complete sign up.

In order to provide our users with a better overall experience, we ask for more information from Facebook when using it to login so that we can learn more about our audience and provide you with the best possible experience. We do not store specific user data and the sharing of it is not required to login with Facebook.

tracking_pixel_9351_tracker