/monty-hall

Monty Hall Simulation. The gameshow where a contestant picks 1 of three doors. The host then shows a goat behind a second door. As the player do you switch to the other door?

Primary LanguagePython

Monty Hall Problem

The Monty Hall problem is named after Monty Hall, the host of the American television game show Let’s Make a Deal.

In the show, contestants are asked to choose between three doors

 

Graphic from Brilliant

 

After the contestant chose a door, Monty Hall, who knew what was behind each door, would reveal a goat behind one of the two remaining doors. The contestant was then given the option to either stick with their original choice or switch to the other unopened door.

This repository simulates playing the game many times switching and non switching.

Watch the Video by Brilliant for more info.

 

Simulation Results

 

Preview of the robotics engineering project

 

Software Dependencies

This code uses the following libraries:

  • streamlit: for building the user interface.
  • plotly: for plotting the results
  • pandas: for storing the data

Usage

git clone ...
python3 -m venv my_env
source my_env/bin/activate
pip install streamlit pandas plotly
streamlit run app.py

This will start the local Streamlit server, and you can access the interface by opening a web browser and navigating to http://localhost:8501.

 

Topics

Python | Low Code UI | Live Plotting |
Data Science | Simulation

 


 

╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮ ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮ ┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃ ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃ ┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃ ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃ ┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃ ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃ ┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃ ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃ ╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯ ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯

 

X Logo             GitHub             LinkedIn

follow all of these for pizza :)