This repository contains a simulation program for the Monty Hall problem, a probability puzzle based on a game show scenario.
The Monty Hall problem is a probability puzzle that is loosely based on the game show "Let's Make a Deal," where a contestant is presented with three doors, one of which hides a prize (such as a car) and the other two hide goats. The contestant initially chooses one door, and then the host (Monty Hall) opens one of the remaining doors, revealing a goat. The contestant is then given the option to switch their choice to the remaining unopened door or stick with their initial choice.
This simulation program replicates the Monty Hall problem scenario and allows users to run multiple simulations to analyze the outcomes based on different strategies (e.g., always switching doors, always staying with the initial choice).
To run the simulation program, follow these steps:
- Clone this repository to your local machine.
git clone git@github.com:Sebastian-0912/Monty-Hall-problem-simulation.git
- Open the monty_hall_simulation.ipynb file in Jupyter Notebook or any compatible platform.
- Run the cells in the notebook to execute the simulation and view the results.
The notebook provides detailed explanations and code comments to guide you through the simulation process. You can modify parameters, such as the number of simulations or the chosen strategy, to conduct different analyses.
After running the simulation, the notebook will display the results, including the number of successful outcomes for each strategy and the corresponding success rates.
This project benefited from the assistance of GPT (Generative Pre-trained Transformer) developed by OpenAI. GPT provided guidance and insights that enhanced the quality and clarity of this README and the accompanying code.
Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.