The Monty Hall puzzle
From Wikipedia:
"The Monty Hall problem is a brain teaser, in the form of a probability puzzle, based nominally on
the American television game show Let's Make a Deal and named after its original host, Monty Hall."
Suppose that as a game show participant you are given the choice of three doors. You are informed
that behind one of the doors is the grand prize and that there is nothing behind the other two doors.
You are asked to pick a door, but not to open it.
Next, the game show host —who knows what is behind each of the doors—, opens one of the doors that you
did not select and you see that nothing is behind it.
You are then given a second choice. You can stick with your original choice of door or you can
switch to the other remaining (closed) door. What is your decision?
The Wikipedia page on this puzzle
contains various solutions, all of them saying that switching to the remaining unopened door
doubles your chances of winning the grand prize compared to staying with your original choice of door.
One of those solutions is based on simulation; i.e., you play the game a large number of times
and you record the outcomes of both strategies: switching doors or staying with your original door choice.
At the end of the simulation you then compare the winnings for both strategies1.
Below you can run that simulation. You set the number of times the game must be simulated
and the browser does the rest. What do you observe when you try different amounts of games?
1Note that although a simulation like this illustrates that switching doors is the better strategy,
it is at best a so-called 'inductive' proof. It does establish a pattern, but it does not provide a 'deductive,'
i.e., logical proof. For that we have to rely on different techniques.
We must also realize that this is all about the probability of winning. As you can see in the plot, staying with
the original door also occasionally wins. It is just that switching doors wins —on average— twice as many times
and hence doubles the likelihood of winning the grand prize.
|