This project was bootstrapped with Create React App.
After one sleepless night over trying to understand the Monty Hall problem, I wrote a command line function to go through different runs of the game to see just how many times it would end up being more favorable to switch doors. After a lot of grumbling, I realized that the reason I had trouble reasoning about it was that I had assumed that the likelihood that Monty would choose the same door as the contestant was equal, when in fact the premise is that Monty knows which door has the prize and so he will choose the only remaining door (the one you haven't chosen and the one that the prize isn't in). So while you think you're playing with 50% chance of each of the doors being the prize door, the likelihood that you chose the right door actually stays at 1/3, while the likelihood that the other door is the correct door rises to 2/3.