The Birthday Paradox

By
Published on

The Paradox

In a room with 23 people, there's a 50% chance that at least two of them have the same birthday.

Sounds like nonesense, but it's true! In order to show why this is the case, we could try to list all the possible ways in which at least two people could share a birthday, calculate the probabilities for each, and add them up. However, there is a much simpler way to think about this.

An event either takes place or doesn't. That means that the probability that it does plus the probability that it doesn't equals to 1. This seems like a trivial observation, but it's critical for solving many problems like this one: calculating the probability of one of those events is enough to obtain the probability for the other one.

Instead of thinking about all the possible ways in which at least two people could share a birthday, let's consider the event in which none of them do.

The (Simplified) Problem

What is the probability that, in a set of n randomly chosen people, none of them share a birthday?

Let's make a few assumptions first in order to simplify the problem:

  1. There are no leap years
  2. Birthdays are equally distributed among the set of all possible dates

With these assumptions in place, let's proceed to solve it.

The Solution

Let's represent each birthday with b1,b2,,bn. For a given value of b1, and in order to prevent shared birthdays, b2 can have one of 3651=364 possible values, which will happen with a probability of 364365. Assuming this happens, for given values of b1 and b2, and to keep preventing shared birthdays, b3 can have one of 3652=363 possible values, which will happen with a probability of 363365. In general, given values of b1,b2,,bn1, there's a probability of 365n+1365 that bn won't share a birthday. So in total, given n people, the probability Pn that nobody shares a birthday with anyone is:

Pn=36513653652365365n+1365=365!365n(365n)!

Thus, the probability that at least two people share a birthday is:

1Pn=1365!365n(365n)!

In particular, P230.493, and 1P230.507, which shows that this so-called paradox is indeed true.