4 ms·
Here, I wrote a simulation in nim: https://gitlab.com/mikenew/monty_hall/-/blob/main/monty_hall.nim https://gitlab.com/mikenew/monty_hall/-/blob/main/monty_hall
by mikenew 5y ago
Here, I wrote a simulation in nim: https://gitlab.com/mikenew/monty_hall/-/blob/main/monty_hall.nim https://gitlab.com/mikenew/monty_hall/-/blob/main/monty_hall...
If you have nim installed you can run it yourself with `nim c -r monty_hall.nim`.
I ran 1 million iterations, and here are the results:
Running the simulation 1000000 times where the host chooses doors randomly
500193 # of times the contestant's originally chosen door contained the prize
499807 # of times the remaining door contained the prize
Running the simulation 1000000 times where the host intentionally chooses empty doors
334432 # of times the contestan'ts originally chosen door contained the prize
665568 # of times the remaining door contained the prize
- joe_the_user 5y agoI'm not going to create an account on that site just for your thing but since you essentially haven't defined what "the host chooses randomly" means in this circumstance", I don't see how a print-out or whatever it gives would enlighten me. Edit: plus your claim is senseless on it's face. Why would what the host knew about the door influence the probability of the contestant's choice being correct? The contestant picks first and the host doesn't influence the contestant.
- mikenew 5y agoDidn't realize that gitlab.com doesn't allow you to view things if you're not logged in. Here it is on github: https://github.com/michaelnew/monty_hall/blob/main/monty_hall.nim https://github.com/michaelnew/monty_hall/blob/main/monty_hal... By "the host chooses randomly", I mean the host picks from the remaining two doors without any knowledge of whether or not the contestant chose the prize door, or which of the two remaining doors contains a prize. The host flips a coin and if it's heads, they choose the remaining door to the left. Tails and they choose the one to the right. Which means that in 1 of 3 games the host will accidentally reveal the prize. Whether or not the host is acting with knowledge to filter out incorrect choices or they are just randomly revealing doors is what makes the difference between a 50/50 probability between the two remaining door, or a 1/3 vs 2/3 probability.
- joe_the_user 5y agoTails and they choose the one to the right. Which means that in 1 of 3 games the host will accidentally reveal the prize. And what happens then? I mean, I think people have said from the start, that this behavior is outside the specification of the problem - which is that the host opens a door and reveals nothing. The situation is about only the situation where the host choose the door with nothing. The host "opens one door without a prize". The key detail is this, "opens one door without a prize", not "knows where the prize is". If the host doesn't know where the prize but still, by chance, "opens one door without a prize", then, in this situation the contestant's information remains the same and the odds remain the same.
- mikenew 5y agoI don't know what to tell you at this point. From the wikipedia article: > Most people come to the conclusion that switching does not matter because there are two unopened doors and one car and that it is a 50/50 choice. This would be true if the host opens a door randomly, but that is not the case; the door opened depends on the player's initial choice, so the assumption of independence does not hold. Random means there's a possibility the host opens the door containing the prize. The Monty Hall problem specifies that that is not a possible scenario, and that the host does not choose randomly. > If the host doesn't know where the prize but still, by chance, "opens one door without a prize", then, in this situation the contestant's information remains the same and the odds remain the same. The host cannon open a door by chance if there's no chance of opening the door with a prize behind it.
- mbg721 5y agoThe host doesn't know exactly where the prize is, but he knows that the door he's opening is a dud; that's the information that he has and the audience doesn't.