The Birthday Paradox

Tivadar Danka small portrait Tivadar Danka
The birthday paradox

Understanding math will make you a better engineer.

So, I am writing the best and most comprehensive book about it.

There is a 62%62\% chance that two of these 2828 people share the same birthday.

This is quite shocking, as most of us would guess the chance to be less than 10%10\%

Here is why our intuition is wrong.

The usual thinking is if there are 2828 people and 365365 days in a year, then chances should be roughly 27/3657.4%27/365 \approx 7.4\%, and if we have 366366 people, then it is guaranteed that two of them share birthdays.

However, this is not how probability works.

First, it is much easier to talk about the probability of having no shared birthdays.

The birthday paradox

This is a common trick, often making the calculations much more manageable.

Let's simplify the problem even more.

Given two people, what is the probability of sharing the same birthday?

By encoding the birthday with an integer between 11 and 365365, we can count the number of configurations.

The birthday paradox

How many days can we pick as the 1st element of the tuple? 365365.

How many days can we pick as the 2nd element to avoid the birthday collision? 364364.

In total, there are 365364365 \cdot 364 ways.

The birthday paradox

To count the number of total configurations, we disregard the potential birthday collision. Thus, there are 365365365 \cdot 365 possibilities.

The probability is the ratio of the number of desired outcomes and all possible outcomes.

The birthday paradox

In this case, the result is the following. Summing up, the probability of two people sharing the same birthdays is less than one percent.

The birthday paradox

What about the general case? Following the same logic, we can solve the general problem.

The birthday paradox

At n=23n = 23 people, the probability reaches 50%50\%.

At n=41n = 41, the probability is 90%90\%.

Quite surprising, isn't it?

If you are curious, this is what the probability distribution looks like.

The birthday paradox

What can we learn from the birthday problem?

That our intuition about probability often fails hard. Most estimate the chances of having a shared birthday among 2525 people very low. The actual probability is more than 50%50\%.

Having a deep understanding of math will make you a better engineer.

I want to help you with this, so I am writing a comprehensive book that takes you from high school math to the advanced stuff.
Join me on this journey and let's do this together!