pmb

Learning mathematics by doing, and Monty Hall

Oct 14, 2006 02:23

The Monty Hall problem came up recently, and I just wanted to toss my hat into the "providing an explanation" ring. Actually, I want to abdicate that role. Instead of proving this by logic, let's just observe that the smug bastards who say "switching will win 2/3 of the time" are right by simulating 10,000 rounds of the actual game.

import ( Read more... )

Leave a comment

Comments 17

martian687 October 14 2006, 02:44:49 UTC
Gah! mycrust helped me understand why it's beneficial to switch. And the logic makes sense to me, but it seems to go against mathamatical intuition. It's like, on one end the logic makes sense, and on another end your simulations prove the logic, but what I really want is a numerical proof that connectes the logic on one end to your simulation results on the other end.

Reply


mycrust October 14 2006, 03:44:11 UTC
It might also be instructive to include the case where the other doors are opened and random and then throw out the events where the prize is revealed (i.e. where the host has no information about which door contains the prize).

Reply

martian687 October 14 2006, 03:58:51 UTC
Yeah, that's the part I'm having trouble grasping...how the host's knowledge fits in.

Reply

pmb October 14 2006, 17:06:41 UTC

# But he only reveals a door that has nothing behind AND that you have not
# yet chosen
del possible_reveal[secret]
if choice in possible_reveal:
del possible_reveal[choice]

Notice that our choice of doors eliminates both the already chosen door AND THE SECRET. Monty knows the secret, and will never open the prize door. Also, if you look at the code above, you'll notice that I never actually DO anything with the chosen variable. I could eliminate the whole "open a door with nothing behind it" step, and just ask you to whether you want to bet that the car is behind your chosen door, or not behind your chosen door. Writing simulation code for this problem is really pretty edifying if you are confused.

Reply

175560 October 17 2006, 08:34:43 UTC
The piece of code you have quoted only changes the variable possible_reveal, which is only used in the computation of reveal, which is never used. So this part of the program has no effect. =)

Reply


mrsmalkav October 14 2006, 03:59:25 UTC
well done.

you provably can't doubt those smug jerks with them fact-based science methods.

(can you BELIEVE that someone would feel it necessary to qualify it as "fact-based science"???)

Reply


(The comment has been removed)

annag October 16 2006, 05:58:40 UTC
"Nothing is true; everything is a model."
i like this. may i steal/borrow it?

Reply


rifhutch October 14 2006, 05:09:37 UTC
I've long thought that most of the confusion surrounding Monty Hall was a result of an incompletely specified protocol. Just stating that "Monty has opened a door" in a single instance is much different from "Monty must always open a door", and we are often left to speculate on the rules Monty is actually operating under. In fact, Monty revealed information like this only infrequently on the original show, which might be doubly confusing to old-time fans.

Reply


Leave a comment

Up