Imagine a group of people of a particular size. They're all chatting to each other, finding out about each other. The subject turns to birthdays. To their surprise, two of them have a birthday on the same day of the year. How extraordinary! Well, how extraordinary is it? How big that the group have to be before it is quite likely? You might think that the group has to be quite big. After all, there are 365 days in the year, so perhaps the group has to be, let's say, about half that number, nearly 200. In fact, if you have a group of 23 people, there is a probability of 50% (or 1 in 2 chance) that two people will have the same birthday.
This is an exercise in probability. You don't have to understand the mathematics; you can just enjoy the results (and fool other people!) But in case you want to know more, or don't believe it, this page gives the reasoning as well.
First, we must state the problem clearly. Given a group of a certain size, what is the probability that two people have the same birthday? First, I think we can discard anyone with a birthday on February 29th! Yes, I know they exist (and I apologise to them) and we could include them, but it means dragging extra fractions around the place. It doesn't make that much difference to the answer, so let's simplify things. That means that the people could have their birthday on any of 365 days. Now, how can we work out the probability? It's trickier than you think. It's easy to work out the probability of someone having a birthday on a particular day but we are comparing different people. And what if three or four or more people have birthdays on the same day? This type of problem is often easier if you look at the opposite. What is the probability of all people in the group having different birthdays? Then the opposite probability (which is what we want) is easy.
A probability is a number between zero (impossible) and one (certain). We usually use decimals to do the actual working out, but it's easy to convert them to percentages (0.5 = 50%). Now, imagine a group of size n. (If you don't like doing this, then think of a number, say 25, and wherever n is mentioned below, think 25, and wherever n+1 is mentioned, think 26, and so on.) Let's say that the probability of n people all having birthdays on different days is Pn. (That's just giving it a name so we can talk about it). The probability of n+1 people all having birthdays on different days will be Pn+1. Now for some maths!
Pn+1 = Pn x (365 - n) / 365
That means that this new person (the n+1th one) can't have his birthday on the same day as the first n people, who have already claimed n days. He can have his birthday on any of the other days of the year, and there are 365 - n of them. Since there are 365 possible days, the probability that his birthday is different is (365 - n) / 365. And you have to multiply that with the previous probability, Pn, so you don't just get him, you get all the previous ones right as well.
But that's no good, I hear you cry! All right, we know Pn+1 if we know Pn, but we don't know Pn! Ah, but we can work out Pn if we know Pn-1. So what? Well, we can carry on taking this down and down until we can get to a probability we do know. (For the people who have been using 25 rather than n, this means if we know the probability for one person, we can work it out for two, and then for three, and so on, until we get to the number we want.) So what is the probability of one person having a birthday different from all other people (in a group of one)? What? That's rubbish! Well, in fact it's certain, (or probability of one). He can't have a birthday different from himself, can he!
All well and good. But what about the original problem? Remember that? We don't want the probability of everyone having different birthdays, that's boring. We want the probability of two people (or more) having the same birthday. That's easy to calculate. It's the opposite, and to work out an opposite probability you take it away from one. This is the same as saying that either everyone has different birthdays, or two or more have the same birthday. There's no other possibility. So the probability we want is 1 - Pn.
So let's go. Click on the button below to get groupsof bigger and bigger sizes. The answers are listed backwards, so the most recent answer is next to the button (this is to stop it keep dropping off the bottom of the page). You are looking for the right-hand number to get above 50%. Carry on further, and see how big the group should be for a probability of 99% that two have the same birthday!
In a group of 1 person, the probability of him having the same birthday as himself is 100% so the probability of two having the same birthday is 0%
© Jo Edkins 2009 - Return to Puzzles index