How large must a class be to make the probability of finding two people with the same birthday at least 50%?
This was the question posed to Marilyn vos Savant in her Ask Marilyn column in Parade magazine.
To answer this question, let's use a 365 day year (sorry, all you people born on February 29th!). We'll start by figuring out the probability that two people have the same birthday.
The first person can have any birthday. That gives her 365 possible birthdays out of 365 days, so the probability of the first person having a birthday is 365/365, or 100%. The chance that the second person has the same birthday is 1/365. To find the probability that both people have this birthday, we have to multiply their separate probabilities. (365/365) * (1/365) = 1/365, or about 0.27%.
To solve the birthday problem, we need to use one of the basic rules of probability: the sum of the probability that an event will happen and the probability that the event won't happen is always 1. (In other words, the chance that anything might or might not happen is always 100%.) Using this concept, we obtain the following:
P(two people share birthday) + P(no two people share birthday) = 1
P(two people share birthday) = 1 - P(no two people share birthday).
To figure out the exact probability of finding two people with the same birthday in a given group, it turns out to be easier to ask the opposite question: what is the probability that NO two will share a birthday, i.e., that they will all have different birthdays? With just two people, the probability that they have different birthdays is 364/365, or about .997. So, the probability that two people have the same birthday is 1 - .997 or just .003.
If there are three people, the probability that the third person has a different birthday from the first two (i.e., the probability that all three will have different birthdays) is (364/365) x (363/365), or .992. So, the probabilitiy that at least two of them share the same birthday is 1 - .992 or .008.
With a fourth person, the probability that all four have different birthdays is (364/365) x (363/365) x (362/365), which is approximately .983. And so on. When a twenty-third person enters the room, the final fraction that you multiply by is 343/365, and the answer you get drops below .5 for the first time, being approximately .493. This is the probability that all 23 people have a different birthday. So, the probability that at least two people share a birthday is 1 - .493 = .507. You can see the calculations for ALL group sizes in my letter to Marilyn vos Savant (see the link above).