So I wrote a little program to calculate your winnings if you always switch. Writing it reveals the huge reason that this problem holds – Monty’s choice is dependent on yours… and he’s omniscient.
int NUM_DOORS = 3;
int ITERATIONS = 1000000;
int winCounter = 0;
for(int i = 0; i < ITERATIONS; i++){
Random rand = new Random();
int winningDoor = rand.nextInt(NUM_DOORS);
int yourDoor = rand.nextInt(NUM_DOORS);
int montysDoor;
if(yourDoor == winningDoor){
montysDoor = rand.nextInt(NUM_DOORS);
while(montysDoor == yourDoor)
montysDoor = rand.nextInt(NUM_DOORS);
} else {
montysDoor = winningDoor
}
// Because we switched doors, we win if monty won
if(montysDoor == winningDoor){
++winCounter;
}
}
Here’s the thing, you have a 1/NUM_DOORS chance of picking the winning door. Monty, being omniscient, always picks the winner if you haven’t. That’s a NUM_DOORS-1/NUM_DOORS chance (i.e. 2/3 in a 3 door game). What Monty is basically asking you is if you want to trust omniscience or blind luck. He ALWAYS gets the winning door if you didn’t trip on it.
Fun fact about the trials – the more doors, the better it is to switch. A game with two doors causes you to win about 50% of the time by switching (you pick a door, Monty picks the other, you switch). 3 doors is always 65-67%, but usually 66.x% (remember, I’m doing a million iterations here). If you have about 100 doors, results are usually in the 99% range. Once you get one million doors, it’s not uncommon for switching to win 100 percent of the time, though it’s usually in the upper 99 percent range.