How many people need to be crowded into a room before two of them are likely to have the same birthday? The answer is a mere 23 to have a fifty-fifty shot. To bring the probability to ninety-nine percent, you need a crowd of only fifty-seven people. And yet there are three hundred and sixty-five days in a year. What's going on?

Is it your birthday? Happy birthday to you! If you're in a room with about 22 other people and you've read the above paragraph, you're thinking that it's likely that at least one other person in the room has your birthday. Fool! That's not the way the Birthday Paradox works. In fact, it's not a paradox at all. When reckoning how likely it is to have matching birthdays in a room, people think of one particular date, perhaps the one that they were born on, out of three hundred and sixty-five days of the year, and assume since people are as likely to be born on one day as any other, there have to be three hundred and sixty-five more people in the room before there's a chance that another of them will be born on that particular date.

But the question wasn't about whether or not two people had one particular birthday in common, it was whether they had any birthday in common. That changes the game, although it may not seem like it.

The best way to understand the Birthday Paradox is not to calculate the likelihood of two people having the same birthday, but two people not having the same birthday. Let us say that my birthday is New Year's Day, January 1st. If a random person were to come along while I was celebrating my birthday/New Year's Day by, say, throwing up behind a park bench, chances are one out of 365 that they would have the same birthday as me. (Odds are a little higher that they'd be a cop, but we'll leave that alone.) So the odds are that 364 out of 365 that they wouldn't have the same birthday as me. Translated into decimals, the odds would be 0.99726 that we'd have different birthdays. Those are good odds.

Since I wouldn't be up to moving anytime soon, and the second person (being a concerned citizen) would want to make sure that I didn't die from alcohol poisoning, we'd both wait there until a third person showed up. Now what are the odds that no one present at that bench at that time has a birthday match?

The odds are already 0.99726 that the first two people don't have a match. The third person would have a 0.99726 chance of not having my birthday. They'd also have a 0.99726 chance of not matching the Good Samaritan's birthday.

Total odds of the non-match? (0.99726 x 0.99726 x 0.99726) Or 0.99180.

That is 0.99726 to the power of the number of unique pairs that can be made of three people.

The number of unique pairs that can be made of 23 people? Two hundred and fifty-three.

So what is 0.99726^253, the chance of there not being a match between anyone and anyone? It's just under fifty percent.

So only a small crowd, say, a grade school class taking a field-trip to the park, would have to gather around that bench before it became more likely than not that two people shared a birthday. Just not my birthday.

Via Better Explained and the University of Illinois.