There is a car behind one of three doors. You make a guess that the first door has the car. After stating your guess, one of the two remaining doors open to reveal nothing. Does your chance of getting a car increase if you decide to switch doors?
Suppose we have n doors, with a car behind 1 of them. The probability of choosing the door with the car behind it on your first pick, is 1n.
then opens k doors, where 0≤k≤n−2 (he has to leave your original door and at least one other door closed).
The probability of picking the car if you choose a different door, is the chance of not having picked the car, which is n−1n, times the probability of picking it now, which is 1n−k−1. This gives us a total probability of
opens no doors, k=0 and that reduces to 1n.
For all k>0, n−1n−k−1>1 and so the probabilty of picking the car on your second guess is greater than 1n.
If k is at its maximum value of n−2, the probability of picking a car after switching becomes