What’s the birthday paradox


So the birthday paradox is where if you’re in a room with 23 other people there’s a 50% chance of at least two people having the same birthday. Alternatively, In a room of 75 there’s a 99.9% chance of at least two people matching.

Why is this?

In: 134

It seems counterintuitive that only 23 people need to hit a 50% chance. But it’s not about the 23 people, it’s about all the combinations of *pairs of people*. There are (23 x 22) pairs, or 253. That’s a lot of pairs, so there’s a good possibility of at least one of those pairs having the same birthday. And the more people you add, the more pairs you have, and the higher the chance you get.

For simplicity, we’ll pretend leap years aren’t a thing, so there are 365 possible birthdays, with equal probability.

If you have only two people what is the probability that they have the same birthday? It’s 1/365. That means the probability they have different birthdays is 364/365. Let’s say that the second option is true.

A third person enters. What is the probability they have a birthday different from the two already there? Well there are 363 possible birthdays remaining that would fit that criteria, so it’s 363/365.

We can therefore calculate the probability of 3 random people *not* sharing a birthday as *364/365 * 363/365*, which can also be written as *(364 * 363) / 365²*. The answer is a little over 0.99, or 99% (Leaving a less than 1% chance that any two of the three share a birthday).

But we can keep going, adding one more person at a time, with their likelihood of not matching any of the previous going down each time. The result will be *(364 * 363 * 362 … ) / 365^n*, where n is one less than the total number of people (and there are n terms multiplied together).

If you do this for 23 people, it is *(364 * 363 … * 344 * 343) / 365²²*. The answer is just over 0.49, or ~49% chance of no matches. This leaves a ~51% chance of at least one match.

Performing the same calculation for 75 people (n=74) gives you 0.00028. That’s a 0.028% chance of no match, and therefore 99.972% chance of at least one match.

It’s not a true paradox where things seem like they must be both true and false simultaneously. Instead, it uses the term paradox because it is very unintuitive and most people can’t wrap their heads around it.

The birthday paradox happens because people look at 23 people and only consider the odds of the 23rd person sharing a birthday. In actuality, you have to consider *every* pair of people and whether or not they share a birthday.

The 2nd person has a 1/365 chance of sharing a birthday with the first person. Assuming they don’t, then the 3rd person has a 2/365 chance of sharing a birthday with either of the first two. The 4th person similarly has a 3/365 chance of sharing a birthday with any of the first 3 people. If you do all the math (which involves some stuff like flipping it into odds of *not* sharing a birthday and then taking the result away from 100%), you get to a >50% chance at 23 people.

Another way of looking at it is the number of pairs of people. When you have 2 people, you have 1 pair. When you have 3 people, you have 2 pairs. At 4 people, you have 6 pairs, and with 5 people you have 10 pairs. This keeps growing at an alarming rate. At 22 people you have 231 pairs, and at 23 people you have 253 pairs. While the odds of a single pair of people not sharing a birthday is >99%, if you multiply those odds together 253 times you get down to 49% chance. By the time you have 75 people in the room, there are 2775 combinations of people, so the odds drop to nearly 0.

essentially its not a 50% chance that 1 person in particular shares a birthday, its the chance any 2 people have a matching birthday, so you have 22+21+20+19…+2+1 = 246 chances.

The odds are so high because you’re not checking to see if *you* have the same birthday as some else in the room. Instead you’re checking to see if person A has the same birthday as person B, or C, or D, etc…and then *also* seeing if person B has the same birthday as person C, or D, or E, etc…and then *also* seeing if person C has the same birthday as person D, or E, or F, etc…and then *also* seeing if person D has the same birthday as person E, or F, or…

As you see, the number of combinations that you’re checking explodes *much* more quickly than you might first thing. As it turns out, with only 23 people you end up checking *so many combinations* that it’s actually a good bet that at least one of them will be a match.