# Three Birthdays On The Same Day

May 29, 2011 5 Comments

At the company I work at, which has about 35 members of staff, it was discovered that three people have the same birthday. The so-called ‘Birthday Paradox‘ tells us that two people having a birthday on the same day is much more likely than one would imagine, so it is interesting to calculate the probability that three people have the same birthday.

Let us suppose that there are N members of staff. Let our probability space be the set of N-tuples of integers between 1 and 365 (inclusive). There are elements in this probability space.

Let us denote the event that there is at least one triplet . Similarly, let us denote the event that there are exactly pairs of people who are sharing a birthday (and no triplets or higher) as .

Then we have that the probability that happens is one minus the probability that or or happens. That is,

Hence we must find an expression for – the probability that pairs of people have the same birthday and everybody else has a different one.

Recall that we are working in the space of ordered N-tuples. Therefore we need to select the positions of each of the pairs. For the first pair we do “N choose 2”, for the second we do “(N-2) choose 2”, and so forth. So, selecting the positions of the birthdays we want to be duplicated, we can do:

Note that we have an *ordered* list of *k* unordered pairs.

We can simplify the above expression to .

Now, we need to choose the birthdays for these pairs to have as the common day. Obviously, each pair must be different, else we’d have (at least) four people with the same birthday, and we don’t want more than two people with birthdays on the same day.

Suppose we pick the *k* days in an ordered fashion (i.e. ). Then we will have over-counted, because the pairs are in an ordered list. For instance, suppose we picked the ordered list of unordered pairs “Person 1 & Person 2”, “Person 3 & Person 4”. Then we selected the ordered list of birthdays “1st Jan, 2nd Jan”. Then this would give us the same thing as if we’d selected the pairs “Person 3 & Person 4”, “Person 1 & Person 2” with the list of birthdays “2nd Jan, 1st Jan”. In this case we over counted by a factor of 2. In general, we will overcount by the number of permutations of the list of pairs. This is .

Now, the remaining people can have any remaining birthday. So the first has a choice of , the next a choice of and so forth. Therefore,

So, for instance, in Mathematica:

A[N_, k_] := N!/(2^k (N - 2 k)!) * 365!/((365 - (N - k))!*k!)

We can verify this by ensuring that is the probability that at least two people will share a birthday in a group of N people. Remember that .

We wish to find the sum of the . There is no obvious closed form expression for it, so it will suffice to numerically calculate it for the desired values. Doing so yields the following graph:

In particular, for my situation – that out of a company of 35 people, three had the same birthday – has a probability of about 4.5%. In fact, these members were at the company back when it was only 12 people strong, and then it had a probability of only 0.33%.

You need a group of 87 people before the chance of three people having a birthday on the same day is 50%. 75% happens after 110 people and 25% at 65 people.

The following graph shows the probability of having two people sharing a birthday in blue and three people sharing a birthday in red:

This spreadsheet gives the full table the probabilities. (Apologies for the Excel format, WordPress didn’t seem to want plaintext files uploaded.)

I see… When I was doing it I was being particularly dense – I hadn’t even considered the possibility that two pairs could share a birthday without a triple doing so!

Excellent work, A+.

I’m working on something for school and I was wondering how you ended up getting that graph?

This is great. Out of 9 people in my department, three of us share a birthday. Always wanted to know those odds.

This is referring to the date being the same, what about the actual day of birth. i.e. 3 of us born on 1st sep 1982.

It is difficult to say. In this it was assumed (not entirely accurately) that the day you were born on is uniformly random. However, it is *certainly* not true to say that the year you were born on is. What this distribution is depends a lot on the situation. For instance, in a school class it is not at all random (if the class is of a particular school year) and at work it is probably much more likely that you are in a particular age range.