Skip to content

Overdrivr/monty-hall-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Monty-hall problem simulation

Python script that simulates the game described in Monty-hall paradox

source: Wikipedia

Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice?

Requirements

  • python 3.2+
  • numpy

Run

python app.py

Example outcome

For 1 million samples

Winning percentage without changing choice:  0.3332942
Winning percentage while changing choice:  0.6667058

About

A simulation of the Monty-Hall problem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages