How many people do you need in a room until there are two people with the same birthdays? The pigeonhole principle dictates that (excluding February 29) since there are 365 birthdays, 366 people in a room would guarantee two people sharing birthdays. However, this is only the number needed to absolutely guarantee a pairing. Using a neat statistical trick known as the birthday problem (or birthday paradox), we can find that a much smaller number is needed to solve the problem.
Let us assume that every birthday is equally possible (in real life, some birthdays are more common than others). If there are 30 people in the room, Person 1 has a chance of sharing a birthday with each of the other 29 people (possible pairs). Person 2 can be paired with 28 people (since they have already been “paired” to 1), Person 3 with 27 people and so forth. Therefore, the number of chances are: 29 + 28 + 27+ … + 1. Using Gauss’s handy addition trick, the total number is (29 + 1) x 29/2 = 435. We can see already that although the total number of individuals is only 30, the total number of pairs already exceeds 365. Since the probability of having a certain birthday is 1/365, it is likely that it would occur when you have so many possible chances.
Using statistical analysis, it can be found that when there are 23 people, the odds of there being a match surpasses 50%, making it more likely that two people share a birthday than not. By 70 people, the probability of a match grows to 99.9%. Therefore, with only 19% of the number required by the pigeonhole principle, the birthday problem can say with 99.9% certainty that there will be two people sharing a birthday.