Member-only story
Solving the Monty Hall Problem With Python
Increase your winning chances for the three-door problem by figuring whether to switch or not
The Monty Hall Problem
The Monty Hall problem is one of the most famous probability puzzles. It was named after Monty Hall, the host for the American TV game show which involved the following problem. The description below is the most typical setup of the game, and it’s just for explanations — the actual awards may be different.
Suppose that you can choose to open a door, behind which there will be an award. There are three doors in total: behind one is a car and behind the others two are goats. After you pick a door, from the remaining two doors, the host will open a door behind which there is a goat for you. At this moment, you’ll be asked whether you want to switch your initial selection to the remaining closed door. Suppose your goal is to maximize the chance of winning the car.
The Puzzling Part and a Simple Solution
At this point, you’re left with two doors: one has the car and the other has a goat. So it appears that it doesn’t matter, you switch your selection or not because the chance is 50% when you pick one from two. However, the truth is that it’s advantageous for…