Monty Hall Problem in Java

I recently stumbled across something called the Monty Hall Problem. It is a basic probability problem that seems mind blowingly non-intuative to most people.

There are a lot of descriptions on this on the web, but basically the problem is this: Three closed doors are in front of a game show contestant. Behind two doors is a goat, and behind the remaining door is a car. The contestant selects one of the doors, then the host opens one of the other two doors that contains a goat. The contestant is asked if he wants to switch with the other closed door. What should the contestant do?

To most people it seems that the probablitiy is 50% either way. One door contains a car, and the other a goat, so it seems natural to assume that there is a 50/50 chance either way. But its not… if the user switches it is 66% more likely to have the car, than if he stays on his first selection.

Anyway, I couldn’t get my head around it so I wrote a little Java application that shows this phenonomena :

Posted in Uncategorized | Tagged , , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">