You're in a quiz. The host shows you 3 doors. Behind one of them, there's a sports car. Behind the 2 others, there's a goat. Host asks you to pick one of those doors. After you have picked one, he opens one of the 2 remaining doors and says "ahaa, there was a goat behind this door. There are still 2 doors left. The sports car is either behind the door you already chose, or it is behind this one here. You have a chance to change your mind now if you want to."
Do you change your door?
Mathematics claim that you
should change the door, thus giving you a better chance to win. I made a scar script to check if this is true.
Ofcourse, even if i ran the script a billion times, it doesn't prove anything 100%, because it's all about propabilities, which cannot be proved by testing something. But, believe whatever you want to.
I ran the script 100000 times, and it seems that if you change the door, your chance is 50%. If you don't change, your chance is 33%.
DoorsAndGoat.scar: you can pick the door yourself, this is to show that my script works correctly.
DoorsAndGoat_AUTOMATED.scar: Here the whole process is automated.
PHP Code:
~ Wins: 569
~ Losses: 568
~ WinRate: 0,500439753737907