Three Birthdays On The Same Day

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 365^N elements in this probability space.

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

Then we have that the probability that B happens is one minus the probability that A_0 or A_1 or A_2, \ldots happens. That is,

\mathbb{P}(B) = 1 - \mathbb{P}(A_0) - \mathbb{P}(A_1) - \mathbb{P}(A_2) - \ldots

Hence we must find an expression for A_k – the probability that k 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:

\binom{N}{2} \binom{N-2}{2} \cdots \binom{N-2(k-1)}{2}

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

We can simplify the above expression to \frac{N!}{2^k (N-2k)!}.

Now, we need to choose the k 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. 365\times364\times\cdots\times(365-k+1)). 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 k!.

Now, the remaining N-2k people can have any remaining birthday. So the first has a choice of 365-k, the next a choice of 365-k-1 and so forth. Therefore,

|A_k| = \frac{N!}{2^k (N-2k)!}\frac{( 365 \times \cdots (365-n+k+1))}{k!}

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 1 - \mathbb{P}(A_0) is the probability that at least two people will share a birthday in a group of N people. Remember that \mathbb{P}(A_k) = |A_k|/365^N.

We wish to find the sum of the A_i. 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:

The probability of three birthdays on the same day in a group of various sizes.

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:

The red is the probability of three people (or more) sharing a birthday. The blue is the probability of two people (or more) sharing a birthday. The horizontal axis is the number of people; vertical is the probability.

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

6 Responses to Three Birthdays On The Same Day

  1. Chris says:

    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+.

  2. Emma says:

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

  3. Steve says:

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

  4. michael says:

    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.

    • Jax says:

      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.

  5. Pingback: three birthdays and a numeral – Technology Revolution

Leave a comment