/threedoors

The three doors statistical problem proof

Primary LanguageC#

Monty Hall Problem (three doors)

The three doors statistical problem proof.

The Monty Hall problem is a probability puzzle.

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?

The brilliant Marylin vos Savant said you should always switch. That bugged me to the point I had to code a testbench. And the outcome is if you keep the initial choice you will win on one third of the time, however, if you switch you will win on two thirds of the time.

The code is very simple.