A couple of years ago, I read “The Curious Incident of the Dog in the Night-Time” by Mark Haddon. The book mentions the Monty Hall problem. I won’t waste bandwidth repeating the explanation of the problem here as the Wikipedia article is very good.
I tried to explain the problem and why it is confusing to a friend. She point blank refused to accept that there could be a strategy or that one door had a higher probability of being in front of a car (or kidney) than another.
To settle the matter, I wrote an implementation of the game in perl.
If your computer doesn’t have perl installed, you will need to install an interpreter. ActivePerl works for me.
If you don’t understand the probability; first, play a few games yourself without cheating. Then, play in “cheat mode”. Then, play with more doors (say 10). Then, play in cheat mode with 10 doors.
If you’re still not convinced, get the computer to play 10 000 or so games against itself with the different numbers of doors and different strategies. Changing should be the best strategy.
Looking back at the code after a two year gap, I feel a bit nostalgic for perl. I stick mainly to PHP and JavaScript for work these days. While I don’t miss some of the eccentricities of perl (OOP always seemed like a hack and the lack of arguments for functions is just odd); I do think that as a language for hacking something together in an afternoon to show to your friends, it’s hard to beat.