Monty Hall Puzzle

This is an online version of the Monty Hall Puzzle that I’ve put together.

I’d be very grateful if people would be willing to give it a test run. It’s finished in the sense that it should work properly, but I haven’t completed all the stuff around it – basically, the Philosophy Experiments site isn’t up and running yet.

It’s a relatively complex piece of programming (it’s using AJAX technology), so it’s possible – quite likely even – that there are glitches. If anybody notices anything, it’d be really useful if you could let me know (especially if it falls over completely!)

There’s one thing worth looking out for. At one point it does stuff all by itself. That’s pretty unusual for a web based thing. Is it too disorienting (i.e., does it need more warning, flagging up, etc)?

The Monty Hall Puzzle itself is pretty cool (especially if you haven’t seen it before).

Thanks guys!

Leave a comment ?

26 Comments.

  1. I kept to the same choice, Door 1, all the way through and it worked perfectly (21 out of 31). I did know the right answer.

  2. Most excellent — particularly good way of convincing people who don’t do math. But you are going to get weird overall results with a pool of philosophers!

  3. Jeremy Stangroom

    Thanks guys. Much appreciated.

    But you are going to get weird overall results with a pool of philosophers!

    Yeah, but hopefully people will start doing better once the non-philosophers join in! ;-)

    (I will reset the results when it goes live properly.)

  4. Jeremy,

    I had seen this before, in the book The Curious Incident of the Dog in the Night-Time, so I knew that switching made the most sense. I won 23, lost 8.

    It worked on Google Chrome with no problems.

    Now I have to show this to my daughter. Thank you!

  5. I think its great Jeremy. We talked about this in my intro class this semester, and I think the confusion for a lot of people was their belief that in all cases, probabilistic logic demands a calculation that ignores all previous information. For example, if you roll a dice 20 times and every time you roll a six, (assuming the dice is legit) your chances of rolling a six on the 21st roll is 1 in 6. The caveat here is that what Monty Hall does after you make your first choice is necessarily reliant on that first choice. As such you must continue the calculation throughout. It is clear that you already know all this. I say it because I think that if my peers looked at this problem, they would need a more elementary explanation to understand it; even after going through the experiment.

  6. Just for kicks, I ran it a couple more times, this time choosing not to switch, and choosing different doors for each of my 10 iterations. Results . . .

    16-15
    11-20

    I also noticed a typo. I got the phrase . . . “This is wrong. You should always should switch.” I got this both times.

    There should also be a Play Again button, just to make things easier . . .

    Again, much fun, and great job . . .

  7. Jeremy Stangroom

    Thanks guys, much appreciated.

    The caveat here is that what Monty Hall does after you make your first choice is necessarily reliant on that first choice.

    Precisely. In fact, two thirds of the time, he’s telling you where the car is (though, of course, you can’t be sure that you’re not in the one third case).

    There should also be a Play Again button, just to make things easier . . .

    Yes, you’re right. There’s actually a problem with how it handles the use of the browser back button. But it’s pretty complicated to sort it out.

    Thanks for pointing out the typo. I’ll correct that.

    Thanks again. Your feedback is very helpful. There’s always the worry with this kind of stuff that it’s full of “bugs” that just haven’t shown themselves on the particular system you’re using to program it with. (Even though, obviously, I test on multiple systems.)

  8. Fine work. I’m e-mailing this link to my friend the high school AP stats teacher immediately after submitting this comment. That should broaden your sample a bit.

  9. Jeremy Stangroom

    Many thanks Bryan!

  10. Jeremy,
    The puzzle you set up is terrific. This is a famous probability problem and has driven many otherwise able mathematicians quite mad.
    I recently came up with a reasonably simple way of showing the odds are 2/3 in favor of winning if you switch doors. Are you interested in seeing my proof?

  11. Jeremy Stangroom

    Thanks Ralph. You’re welcome to post your proof here – or to email it to me – but I’m hopeless at math, so likely I’m not going to understand it!

  12. Okay, choose a door and there’s a 1/3 probability the Ferrari is bind it and a 2/3 probability it’s behind one of the unpicked doors. What if at this point you were given the option of switching to the other two doors together, as a unit? I hope it’s obvious you should switch to the to door package since it gives you a 2/3 probability of having the right door. But opening one of the two unpicked doors and revealing the goat is equivalent to allowing you to switch to the two door package, the open door now doesn’t add to the probabilities in any way. So switch to the unopened, originally unpicked door. You have a 2/3 probability of getting the Ferrari.
    In a nutshell, the 1/3 probability you started with for the picked door is not going to change. That’s the best you could do with that door. So given the one remaining door to switch to, you’re switching from a 1/3 chance to 2/3, which is all that remains.

  13. Jeremy Stangroom

    Yes, that’s neat. I think what you’re arguing is that the fact that the door has been opened doesn’t alter the fact that it can be seen as part of a package, so all you’ve got to do is to select the unopened part of the package, and you get your two-thirds probability.

    I’m in no position to judge whether that works formally, but it seems to make sense!

  14. No bugs. Good fun. Even amusing in places.

    Want I should link to it at B&W?

  15. Jeremy Stangroom

    Thanks!

    Even amusing in places.

    I think the talking goat might have misanthropic tendencies! :-)

    Yeah, if you could link to it on B&W that’d be helpful. Just need to get a good selection of people looking at it before doing anything else with it.

  16. Even though people laugh at the goat’s jokes! Ungrateful bastard.

    Want me to link to it at Facebook too? If people like it they might pass it on and then you’d get lots.

  17. Jeremy Stangroom

    Ungrateful bastard.

    Well that’s misanthropes for you (or goats)!

    Facebook would be excellent. Thanks!

  18. I did this with my 11 year old daughter, and she was pretty sure she made the right choice in NOT switching because in her 10 plays, she won 7 times.

    She ended up losing in the end, but blamed it on the computer!

    She got the explanation, but 7 cars is a winner in her book . . .

  19. Jeremy Stangroom

    :-)

    That’s cool. The reason it carries on past the 10 is because the law of averages is going to mess things up too often otherwise.

    But, tell you what, I think if I were your daughter, I’d also be suspecting some kind of stitch up by the computer!

  20. Tried it (Firefox, Windows XP). Worked perfectly. No bugs.

    And I won! And, even better, I knew why! Not too bad at 2 in the morning!…
    All the same, cool game, cool presentation.

  21. Jeremy Stangroom

    Thanks Arnaud! Glad you won. Very impressive at 2 in the morning!

  22. Well, Grendels dad got the same outcome as Tysdaddys daughter. (Winning handily when we are in control, but loosing overall once the computer takes over.) Would increasing the number of trials where the human stays in control make the game too tedious? With such a small sample tysdaddys daughter and I might be convinced we are psychic and your computer is just lacking in our special gifts. ;^)

  23. Jeremy Stangroom

    Would increasing the number of trials where the human stays in control make the game too tedious?

    I think so. I mean, obviously, I’m not sure. But the reason I limited it was that I’m guessing that people who are perhaps less motivated than you guys might well click away from the game if they have to click for too long (especially if they’re losing).

    It is, of course, entirely possible you’re psychic, and you just don’t know it yet!

    Thanks GD.

  24. ok so swopping from 1:3 chance to 2:3 works statistically.
    I have news for you – stats are not real life.
    think: -how many times does a contestant get to play the game? only once.
    -how furious are you going to feel if, on your one chance, you swop from the winner to a loser? for myself – very.
    conclusion: stick to your guns and go home poor but happy you didn’t try to second-guess.

  25. I wrote a spreadsheet to simulate the Monty Hall problem you are welcome to try (just press F9 to recalculate and try the different tabs):
    http://www.users.globalnet.co.uk/~slocks/sharedfiles/Monty-Hall-simulation.xls

  26. A good reasoning exercise. Introductory statistics -> Initial, uninformed decision has a 1/3 probability.
    Given the opportunity, one should always switch – odds improve to 1/2 (not 2/3 – one of the doors has been eliminated, no longer a factor).

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>