The Monty Hall Problem

Yesterday, I received a really interesting brain teaser, which I just learned is called the Monty Hall problem. What surprised me the most about this problem is how someone could make a choice thats seems logical but actually goes against what is significalntly more statistically probable.

The problem goes like this:

Say you are on a TV game show where there are three doors and a car behind one of the doors. You have a chance to make a guess and if you pick the correct door, you get the car. You choose one of the doors, but before you open it to see if you have won, the game show host stops you and offers you a deal. He has knowledge of which door has the car and will open one of the doors you have not chosen to reveal which of them has nothing behind it. He then offers you an opportunity for you to either stay with your original choice, or choose the other remaining unopened door. What should you do? Stay with your original choice or switch? Does it even matter?

Seems pretty straight forward...

When I first was given this problem, my thought process was this:

  • The first choice I make has a 33.3% chance of being correct.
  • When one of the empty doors is eliminated, you now have a 50% chance of choosing the correct door.

Since it seems as if the choice is now 50-50, I thought that it didn't matter if you stayed with your original choice or not.

I was immediately informed that I was wrong and that if you wrote a program that simulated this game show and ran it thousands of times, you would see that if you consistantly pick the other door, you win on average 2 out of 3 times! This blew my mind. Not only is there a correct answer, but the statistical probability shows that the correct choice give you overwheminly better odds.

I wrote a really quick and dirty simulation to show that this actually is the case. You can see it here. I've been playing around a bit with TypeScript so that's what it's written in, but its close enough to JavaScript so if you're familiar with ES2015 syntax, it should mostly make sense. In order to see the output of the code, make sure the output pane is selected and press the 'Enable js in output pane' button in the upper right corner.

But, why!?

The reason why for this eluded me until a few hours ago when I decided to sit down and really think about the problem.

  • Let's say you pick one of the three doors. It is still true that you have a 33.3% chance of it being correct.
  • There is also a 66.6% chance that the car is behind one of the other doors.
  • After one of the doors is elminiated, if you stay with the original choice, your odds you are correct is still 33.3%. Simply removing opening one of the doors doesn't change that probablility. This is the step that is the most confusing.
  • That also means that since there was a a 66% chance that it was behind one of the other doors and the host opened one of those two doors, than there is a 66.6% chance it is behind the remaining door.

If you don't believe that this is correct, you're not alone! From the Wikipedia article:

Many readers of vos Savant's column refused to believe switching is beneficial despite her explanation. After the problem appeared in Parade, approximately 10,000 readers, including nearly 1,000 with PhDs, wrote to the magazine, most of them claiming vos Savant was wrong (Tierney 1991). Even when given explanations, simulations, and formal mathematical proofs, many people still do not accept that switching is the best strategy (vos Savant 1991a). Paul Erdős, one of the most prolific mathematicians in history, remained unconvinced until he was shown a computer simulation confirming the predicted result (Vazsonyi 1999).

Let me know if you have any thoughts in the comments.