Monty Hall in Megabytes

CSEF · 2014 Mathematics & Software

Overview

Objectives/Goals My objective was to find the best answer to the Monty Hall problem using a computer program I created. Methods/Materials Materials: Computer Scratch 2.0 Programming Language from MIT Media Lab Methods: Step 1: Create an interactive computer program that stimulates the Monty Hall problem. Step 2: Revise the program so it is automated. Step 3: Run the program in three sessions, with 1,000,000 plays in each session. Step 4: Adjust the program so that it doesn't switch doors. Step 5: Run this version in three sessions, with 1,000,000 plays in each session. Results I tested the Monty Hall problem 6,000,000 times with my computer program. Of these trials, during 3,000,000 the program switched doors, and during 3,000,000 the program did not switch doors. I split each set of 3 million into three parts, with 1,000,000 trials in each part. In the first one million trials, with switching doors, the computer chose the correct door 666,236 times and a wrong one 333,764 times. In the next million, still switching, the computer chose the right door 666,103 times and an incorrect one 333,897 times.In the third million with switching doors, the correct door was chosen 666,039 times while a wrong one was chosen 333,961 times. When the computer didn't switch its choice of door, for the first million the right door was chosen 333,873 times and a wrong door was chosen 666,127 times. In the next million, still not switching, the computer chose the correct door 333,734 times and an incorrect one 666,266 times. For the final million without switching, the computer chose the right door 332,692 times and an incorrect one 667,308 times. Conclusions/Discussion My computer program chose the correct door more times when it switched doors after its original choice than when it stayed with its choice. While switching doors, the correct door was chosen about two-thirds of the time, but when not switching, the correct door was only picked around one-third of the time. So, switching doors doubles the chance that you#ll pick correctly. Clearly, the best answer is to switch doors.

Summary statement

The purpose of this project is to find the best answer to the Monty Hall problem using a computer program I made.

Help received

Dad gave feedback on how to improve computer program; teacher reviewed initial idea

Competition history

  • CSEF 2014 Mathematics & Software · Entry J1402

Resources

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Browse more like this

Source: California Science & Engineering Fair public projects

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google