Skip to content

"Explore the famous Monty Hall Problem, a probability puzzle inspired by a game show, with this interactive simulator."

Notifications You must be signed in to change notification settings

shashankatthaluri/Monty_Hall_problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Monty Hall Problem Simulator 🚪🐐🚗

Welcome to the Monty Hall Problem Simulator! This program allows you to experiment with the famous Monty Hall Problem, a probability puzzle inspired by a game show.

Overview 🌐

The Monty Hall Problem is a probability puzzle based on a game show scenario. Here's how it works:

  1. You are presented with three doors.
  2. Behind one door, there is a valuable prize, like a car.
  3. Behind the other two doors, there are less desirable prizes, like goats.

You make an initial choice by picking one of the doors. The host, who knows what's behind each door, then opens another door revealing a goat. Now, you have a choice:

  • Stick with your original choice.
  • Switch to the other unopened door.

The puzzle lies in determining the optimal strategy for maximizing your chances of winning the car.

How to Play 🎮

  1. Run the program and follow the on-screen instructions.
  2. Pick a door (1, 2, or 3).
  3. The host will reveal a door with a goat.
  4. Decide whether to stick or switch.
  5. Discover if you won the car or not.

Repeat the experiment to observe how different strategies impact your success rate.

Why Swap? 🤔

The counterintuitive answer to the Monty Hall Problem is that you should always switch doors after the host reveals a goat. The probability of winning increases from 1/3 to 2/3 if you decide to swap.

How It Works 🕵️‍♂️

The simulator uses randomization to simulate the initial placement of the car and goats. It then prompts you to make choices and reveals outcomes based on your decisions, helping you understand the probabilistic nature of the Monty Hall Problem.

Requirements 🛠️

  • Python 3.x

Usage 🚀

  1. Ensure you have Python installed.
  2. Run the program in your terminal or command prompt.
  3. Follow the on-screen instructions to play and observe outcomes.

Contributing 👥

If you want to contribute to this project, feel free to fork it and submit a pull request. All contributions are welcome!

I hope you enjoy experimenting with the Monty Hall Problem! Feel free to contribute and share your insights. 🎲🐐🚪

About

"Explore the famous Monty Hall Problem, a probability puzzle inspired by a game show, with this interactive simulator."

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages