Monty Hall’s paradox — solve it by simulation!

D in our case is when the host choosing door B and there is no price behind it.Let’s create a table.The table where we know only priorsBecause initially price was hidden behind the door randomly, the prior probability that price is behind one of the doors is 1/3.So far so go!.Now, let’s think about likelihood.If the price behind door A, the host can open doors B or C..In that case probability of him open door B is 1/2..But since that price behind door A, the probability that price not behind door B is 1.If the price behind door B, the host can only open door C, so the probability of him opens door B is 0If the price behind door C, the host can open door B with probability 1.The table where we figure out our likelihoodNext is easyCompleted tableWow!.So you are more likely to win (66%) if you change your initial answer..Key to understanding is simple: Host is affecting the probability because he is not choosing randomly which door to open.Simulation of the paradoxSo I made a simple experiment to simulate the paradox..You have options to always keep your choice same as an initial answer or always change your initial choice..Please, find Gist below, the repository can be also found on a GitHubResults:Below you can find a visualization of the experiment..In a 1000 experiments, I’ve got a 67% chance to win if player changing his initial choice, and only 34% chance to win if I would always keep my initial choice unchanged..Results are very close to the formal solution with the Bayesian formula.34% of winning67% of winningInstead of a conclusion:Computational statistics if fun!.And at least for me, it super clearly illustrates the solution.Monty Hall’s paradox is not easy to digest, even when you now correct answer, that can be obtained in different ways.Thanks for reading that!.Feedbacks are always welcome on LinkedIn or GitHubPrevious articles:About GANs: different Machine Learning related staff: More details

Leave a Reply