Experimental design: Monty Hall

L. Nemo:

I’m afraid I’m still not getting it. According to step #9 of your revised process, switch vs. hold should be a 50-50 proposition. Why, then, in your results table, am I switching twice as often as I am holding? What would be the predicted results if I switched as often as I held?

Irishman:

Your math does not add up. On your chart, the probability of winning by holding is only 4/18, and the probability of winning by switching is 14/18. You also have it mathematically impossible to win the car when choosing door #3.

Okay, try another way of looking at it.

Forget about the doors. Let’s say you have two cards - one black and one white. You can choose either one of them and put them down on the table.

Monty has a big bag full of marbles. The bag contains 200 black marbles and 100 white marbles. After you put your card down, he reaches into the bag and pulls out a marble at random. If the color of the marble matches the color of your card, you win the prize.

I’m sure you can see that the smart move for you to do is put down the black card. A black “guess” will win twice as often as a white “guess”.

You have the same odds in the standard situation. You have a one third chance of picking the right door at random. That means you have a one third chance of winning by holding (you picked the right door) and a two thirds chance of winning by switching (you picked the wrong door).

And now I have to admit I screwed up.

I wrote it all out on a sheet of paper and then when I typed it on the computer, I screwed up my numbers.

My post should have had these numbers:

And from that point on, I was thinking about what I originally wrote rather than looking at what I had actually posted.

Sorry for the confusion.

CRAP!!! Copy/paste error building the table. I really did try to double check everything, but still goofed up. (constructing a table with spaces is a pain)

If you look at the first 2 sections (Door 1, Door 2), you will see a pattern. If the probability is listed as 1/18, then stay will give a car (win) and switch will give a goat (lose). If the probability is listed as 1/9, stay will give a goat (lose) and switch will get a car (win). In those two sections, the pattern is consistent.

For Door 3, I fumbled the copy/paste, so both the options with 1/9 prob and the ones with 1/18 prob show staying gives a goat (lose) and switching gives a car (win). This is incorrect. The pattern should be consistent with the first two sections.

Corrected table



You pick     Car Location     Host Opens     Total Prob.     Stay     Switch
(prob)          (prob)          (prob)  
____________________________________________________________________________
Door 1          Door 1          Door 2          1/18         car      goat
 1/3             1/3             1/2
                              ______________________________________________
                                Door 3          1/18         car      goat
                                 1/2          
             _______________________________________________________________
                Door 2          Door 2          0             -        - 
                 1/3              0
                              ______________________________________________
                                Door 3          1/9          goat      car
                                  1  
             _______________________________________________________________
                Door 3          Door 2          1/9          goat      car
                 1/3              1 
                              ______________________________________________
                                Door 3          0             -        - 
                                  0  
____________________________________________________________________________
Door 2          Door 1          Door 1          0             -        - 
 1/3             1/3             0
                              ______________________________________________
                                Door 3          1/9          goat      car
                                  1  
             _______________________________________________________________
                Door 2          Door 1          1/18         car      goat
                 1/3             1/2          
                              ______________________________________________
                                Door 3          1/18         car      goat
                                 1/2
             _______________________________________________________________
                Door 3          Door 1          1/9          goat      car
                 1/3              1 
                              ______________________________________________
                                Door 3          0             -        - 
                                  0     
____________________________________________________________________________
Door 3          Door 1          Door 1          0             -        - 
 1/3             1/3              0
                              ______________________________________________
                                Door 2          1/9          goat      car
                                  1 
             _______________________________________________________________
                Door 2          Door 1          1/9          goat      car
                 1/3              1
                              ______________________________________________
                                Door 2          0             -        - 
                                  0                      
             _______________________________________________________________
                Door 3          Door 1          1/18         car      goat
                 1/3             1/2
                              ______________________________________________
                                Door 2          1/18         car      goat
                                 1/2 
____________________________________________________________________________
                                  Sum of Prob =   1
                                        Prob strategy wins =  1/3      2/3


I just ran the experiment 100 times, and the results came out perfectly:

keep and win: 16
keep and lose: 34

switch and win: 33
switch and lose: 17

It was touch-and-go there for the first 20 or 30 iterations. But then we regressed towards the mean, and by 60 the pattern was clear.

I find it fascinating that the game itself is a 50-50 proposition – half the iterations ended in wins, half in losses – but the odds for a given door are not.

Experimental verification: gotta love it. Thanks, everybody!

For future reference, here’s a simulation of the Monty Hall problem that lets you quickly simulate up to 1000 runs, or go through them one by one. (For some reason, it doesn’t seem to work with firefox, though – IE seems fine.)