This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A gameshow host gives you three doors. | |
// Behind two of the doors are goats, behind one of the doors is a brand new house. | |
// You pick a door at random. You have a 33% chance to correctly guess the door with the house. | |
// The gameshow host opens one of the other doors and presents a goat. | |
// Now two doors remain; one with a goat and one with the house. | |
// The host now says, 'would you like to stick with your door or change to the other door?' | |
// Statistically speaking, is it in your interest to stay with your door, or switch to the other one? | |
var firstGuessWasCorrect = 0; | |
var changingWasCorrect = 0; |