The (Selfish) Birthday Problem

Gavin Lee 2021-06-18 2 min read

Another reminder of your age. Photo by Dassi Hersh.

I’m always reminded of the so-called ‘birthday problem’ whenever it’s my own birthday. In reality it is a benign combinatorics problem, solvable with a high school level of mathematics. However it was one of those problems that prompted the average joe to think again about scales and how oftentime humans are not so good at grasping them. This became quite clear during the COVID-19 pandemic, where the concepts of exponential growth and decay were actually so difficult for the general public to understand. On a lighter note, let’s relive the problem again, for my first ‘technical’ blog post.

The canonical birthday problem involves determining the probability that in a room of \(n\) people, at least two people share the same birthday. On first glance, you may think that if say \(n=23\), the probability is probably small. In fact, for this \(n\), the probability is more than 50%. If \(n=70\), there is already a 99.9% chance of this happening.

Since it’s my birthday today, let’s calculate a slightly different, more selfish quantity. What is the probability that in a room of \(n\) people, no one shares the same birthday as me? This calculation is actually slightly simpler than the canonical variant, but let’s see how it’s done anyway. Each of the \(n-1\) people in the room cannot have your birthday, but they may have the same birthday as each other. Thus for each person, there is a probability of \(\dfrac{364}{365}\) to not have the same birthday as you, assuming 365 days in a year. To get the combined probability of everyone having the same situation, multiply this number as many times as needed. Thus \[ \mathbb{P}(\text{no one has the same birthday as you}) = \left(\dfrac{364}{365}\right)^{n-1}. \]

The complementary probability is simply \[ \mathbb{P}(\text{someone has the same birthday as you}) = 1 - \left(\dfrac{364}{365}\right)^{n-1}. \]

Clearly this probability is more in line with some of our ‘first thoughts’ when thinking about the canonical birthday problem. Since we do not care if other people have the same birthday, just not ours, the probabilities are smaller. For example, at \(n=23\), there is only a 5.8% chance that someone has the same birthday as myself.