Monty Hall problem and simulation

There’s been a bit of a debate on the forum at about the Monty Hall problem. The crux of the problem is:

  • There are three doors. Behind one is a car, behind the other two a goat.
  • The contestant picks a door.
  • One of the other doors is opened to reveal a goat.
  • The contestant is then asked if they want to stick with the door they chose originally or change to the other unopened door.

Is it better to always stick or always change?

Remarkably, you have a 2/3 chance of winning if you decide to change every time.

To help sort things out, I wrote a little simulation program:
Monty Hall simulation.

And here is The Wikipedia entry on the Monty Hall problem.

Leave a Reply

Your email address will not be published. Required fields are marked *