Skip to main content

Posts

Showing posts from September, 2019

Testing the Monty Hall problem (n=1000)

What is the Monty Hall problem? The Monty Hall Problem is a famous statistic brain teaser, which has a counter-intuitive solution Wiki:  https://en.wikipedia.org/wiki/Monty_Hall_problem The brain teaser is as follows: The player is in a game show and has to choose from one of three doors Two of these doors lead to a goat each Only one leads to a car The player chooses one door at random, since they have no way of knowing the correct door The host then looks behind the other two doors and reveals one of them showing a goat The player now has the opportunity to keep his original guess, or switch to the remaining door The statistics answer is: switching to the remaining door gives you a 2/3 chance of winning. It's counter-intuitive, and that's why, we need to prove it. Ok. let's simulate this by replicating the steps of the original problem In [1]: import random Check if the door picked at random is 1/3 probabil...