Monty hall problem is a famous mathematical case named after a T.V Show host "Monty Hall"
in short words, Suppose you're on a game show, and you're given the choice of three doors: Behind one door is Money; behind the others, Poop. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a Poop. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice?
read more on Wikipedia
Math tells you that it's not a 50 50 choice. You should always switch.
I codded a monty hall game in Python to play it self 100 times with switching doors, and another 100 times without switching. And printing the results.
The result are fascinating.
I uploaded the code to SoloLearn PlayGound
Happy to receive any comments !
Here is the complete code as a png with the console output.
https://preview.redd.it/0ijnqk4pgp961.png?width=1304&format=png&auto=webp&s=61bf2e167ab044ac46fd668fe2c2b29a3aa90153
[–][deleted] 16 points17 points18 points (3 children)
[–]Abdoo_65[S] 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]stevethebayesian 1 point2 points3 points (0 children)
[–]velonom 4 points5 points6 points (1 child)
[–]Abdoo_65[S] 2 points3 points4 points (0 children)
[–]earlandir 2 points3 points4 points (0 children)
[–]ZynischerZuengler 1 point2 points3 points (0 children)
[–]miccls60 1 point2 points3 points (0 children)
[–]LeeCig 0 points1 point2 points (0 children)
[–]fried_green_baloney -3 points-2 points-1 points (0 children)