Monty Hall Simulator
The Monty Hall Game is a brain teaser loosely based on and named after the host of the Game Show Let's Make a Deal. The game is set up to have three doors, only one of which reveals a prize behind it. The contestant is first asked to choose a door, and once a door is chosen, the host opens one of the two remaining doors to reveal what is behind it. If both of the remaining doors would reveal no prize, one is opened at random; otherwise the door without a prize is opened. The host then asks the contestant if they would like to keep their original selection, or switch to the remaining unopened door.
It doesn't seem logical, but switching to the remaining unopened door is twice as likely to reveal a prize (2/3 chance as opposed to 1/3 chance). I couldn't make sense of this, so I decided to build my own simulation with the hope that it would help me better understand this. It did not.
You'll notice that the more games you play, the closer the outcomes come out to a 33.3% winning chance when keeping the original selection, and a 66.7% winning chance when switching to the remaining unopened door. All selections are chosen at random, except in the case when the host must remove the only remaining door without a prize behind it
To test it out for yourself, specify a number of games to run and click the Run Simulation button to begin! The maximum number of games allowed per simulation is 25,000.
Game Count: