This post “Monty Hall Solution” continues on from my previous post Monty Hall Problem – Can You Solve This Maths Puzzle? If you haven’t read that post, then read it now before reading this. Because I will now show you even more Monty Hall Solution coolness! We saw that you could increase (double) your chances of winning a car by understanding some maths, so let’s delve further into it and who knows, you might win something big (then again you might not, but hey!).
So what happens, if there are 4 doors instead of 3 doors? And what happens if there are 5 doors, 6 doors, hmmm, more code required – cool!
Checkout the code here Alan Cowap GitHub.
Does The Monty Hall Solution Hold True For 4 or More Doors?
For 4 doors we would expect that the odds would be 1/4 (25%) for not changing Vs 1.5/4 (37.5%) for changing. “How did you get those figures?” I hear you ask. Well, with 4 doors, each door has a 25% chance of being correct. Our 1st chosen door has a 25% chance – the other 3 doors have a combined 75% chance. When Monty removes one of those 3 doors by opening it -the remaining 2 doors still have a combined 75% chance – which is now divided by the 2 remaining doors i.e. 37.50% chance each. Once again the figures from the 70 million simulations are very precise.
Doors in Game: 4 Unchanged Wins: 2498993, Changed Wins: 3750566 Unchanged Wins: 24.99%, Changed Wins: 37.51% Unchanged Wins: 2498720, Changed Wins: 3750419 Unchanged Wins: 24.99%, Changed Wins: 37.50% Unchanged Wins: 2500812, Changed Wins: 3748980 Unchanged Wins: 25.01%, Changed Wins: 37.49% Unchanged Wins: 2499171, Changed Wins: 3747829 Unchanged Wins: 24.99%, Changed Wins: 37.48% Unchanged Wins: 2499602, Changed Wins: 3749207 Unchanged Wins: 25.00%, Changed Wins: 37.49% Unchanged Wins: 2497548, Changed Wins: 3748332 Unchanged Wins: 24.98%, Changed Wins: 37.48% Unchanged Wins: 2499206, Changed Wins: 3749860 Unchanged Wins: 24.99%, Changed Wins: 37.50%