Assignment 3:

The Monty Hall Problem:

The Monty Hall problem comes from a TV game show, “Lets’ Make A Deal,” hosted by Monty Hall. A contestant is shown three doors, and will win whatever is behind the door the contestant chooses. Behind one door is a car, behind the other two doors are goats. The contestant chooses a door. Monty Hall then opens another door, which he knows is hiding a goat. The contestant then has the option of staying with his original choice, or switching to the one remaining unopen door. Should the contestant switch? Our assignment is to create a simulator for the Monty Hall problem.

The program should:

* Repeat 1000 times:

  • Randomly place the prize in one of the three doors and randomly choose a door for the contestant.
  • Eliminate a door that was not chosen, and does not have the prize.
  • Do not have the contestant switch to the remaining door, and tally as a win or loss as appropriate.

*Repeat the above 1000 times again, but this time have the contestant switch to the remaining door.

* Present your results. Should the contestant switch?

Note: The answer is counterintuitive. For an explanation and analysis, you can check here: http://montyhallproblem.com/

courses/cs203-201201/assignments/monty_hall_problem.txt · Last modified: 2012/02/09 15:56 by jones
VCCS Top Events Extended Site Search Login Vassar Science Web Vassar Home Driven by DokuWiki Valid XHTML 1.0