Nov. 8th, 2007

alexpgp: (Default)
While cleaning out stuff, I ran across the source code of a BASIC program I wrote in... 1991 (!) that tests the "Monty Hall paradox."

Who is Monty Hall, you ask? And what's the paradox?

Monty Hall is (was?) a well-known game show host, and though I don't recall his ever doing anything along the lines of the setup to the problem, the name has stuck. The setup is this:
A game show host offers a contestant the choice of whatever is behind one of three curtains. One of the curtains hides an expensive prize; the other two curtains hide nothing. Once the contestant picks a curtain, the host orders one of the other two curtains drawn aside, revealing nothing. The host then offers the contestant an opportunity to change his or her mind.
The key question now is:
Should the contestant switch or stay with the original choice?
One way to look at the situation is this: The contestant had a 1/3 chance of picking the prize before, and now, it's 1/2, since there are now only two choices and one prize, so it doesn't matter if the contestant switches or stays.

The other view is this: There was a 1/3 chance of winning before the worthless prize was revealed. This means there was a 2/3 chance the prize was behind one of the other two curtains. Now that one of the curtains has been shown to be worthless, the chance of winning is now "concentrated" in the other curtain, so the contestant should switch.

Although it turns out that the "should switch" argument is correct, there are nevertheless die-hard partisans, including (supposedly) mathematicians, who insist it doesn't matter what the contestant does.

The program I wrote simulated the scenario a thousand times and printed the result (which shows that switching is the preferred strategy). However, simulations aren't universally compelling. Since then, I've formulated a line of reasoning that I think does the trick. It runs as follows:

Consider an immense game show stage where there are a million curtains, and only one prize. After you pick a curtain at random, the host causes 999,998 of the remaining curtains to be opened to reveal... nothing. The prize is now either behind the curtain you picked, or the one other curtain left.

Should you stick or should you switch? Has your initial one-in-a-million shot turned into an even-money proposition because there are now only two curtains to choose from, or is it virtually a certainty that the prize is behind the one remaining curtain of the ones you didn't pick?

Me, I'd switch.

Cheers...

Profile

alexpgp: (Default)
alexpgp

January 2018

S M T W T F S
  1 2 3456
7 8910111213
14 15 16 17181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 10th, 2025 09:10 pm
Powered by Dreamwidth Studios