Skip to content

An extension of the famous Monty Hall problem in statistics built using the java Swing library to help build intuition about the problem's counterintuitive result

Notifications You must be signed in to change notification settings

tommysteryy/Monty-Hall-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Monty Hall Simulator

Demo

Default Game:

Default Monty Hall Game Demo

Custom Game & Saving:

Custom Monty Hall Game Demo

Inspiration

In my STAT 302: Introduction to Probability course, we talked about the Monty Hall game show situation. To read more about the setup of the game, you can visit: https://statisticsbyjim.com/fun/monty-hall-problem/. Very briefly, the game runs as follows:

There are three doors to pick from. Two of them have a goat behind it, and one of them has a brand-new car behind it. The door you pick corresponds to the item you are bringing home.

Example Gameshow Snippet:

Monty Hall (the game show host) tells you "Pick a door!".

Monty Hall Gameshow Setup

I am a contestant, and I pick door 1. Monty Hall, upon hearing this, opens door 3 and reveals that there is a goat behind that door.

Monty Hall Gameshow Picked 3

Now, he asks "would you like to switch to door 3? Or would you like to stick with door 1?" This is where the contestants make their final decision.

Goal

During my STAT 302 class, we analyzed the mathematics behind this game, showing the counterintuitive result that switching doors actually leads to a doubled chance of winning the car compared to not switching. I thought that it would be helpful to build a simulation to compare the options of switching and not switching over thousands of simulated games, and count the probabilities.

My application is a dashboard where you can extensively learn the Monty Hall problem interactively. It will include:

  • The default game that is the classic Monty Hall problem
  • Customizable game scenarios that can be built through adding doors of your choice
  • Clickable doors to check the prize behind certain doors
  • Functionality to run a simulation of your custom-built game scenario 1000 times and comparing the performance of "switching" vs "not switching".

This project was inspired by the avid mathematics tutor/teacher in me. Through this application, I want to extend my help to students who may struggle with math in one way or another with this concept.

About

An extension of the famous Monty Hall problem in statistics built using the java Swing library to help build intuition about the problem's counterintuitive result

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages