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... )
Comments 17
Reply
Reply
Reply
# 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
Reply
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)
i like this. may i steal/borrow it?
Reply
Reply
Leave a comment