Skip to content

neilcronin/Goats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

This ruby script demonstrates the apparently-absurd fact underlying the Monty Hall problem (http://en.wikipedia.org/wiki/Monty_Hall_problem).

There are three doors.  Two doors have a goat behind them.  One door has a new car behind it.  The contestant chooses a door.  Monty Hall opens a second door, revealing a goat.  The contestant must choose whether or not to switch between the two other doors.

Running this yields:

	$ ruby goats.rb 
	By not switching doors, you win 33335304 times out of 100000000.
	By switching doors, you win 66664697 times out of 100000000.

About

An illustration of the Monty Hall problem.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages