Tivadar Danka Profile picture
I make math accessible for everyone. Mathematician with an INTJ personality. Chaotic good. Writing https://t.co/jYkO4bz6lL

Mar 1, 2022, 15 tweets

Let's test your probabilistic intuition!

There are 25 people in a room. What is the probability that two of them share the same birthday?

If you think it is low, you'll be surprised to find out that the actual probability is more than 50%.

Here is why!

↓ A thread. ↓

The usual thinking is if there are 25 people and 365 days in a year, then chances should be roughly 24/365 ≈ 6.5%, and if we have 366 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.

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 1 and 365 and the configurations as tuples, we can easily count their total number.

How many days can we pick as the 1st element of the tuple? 365.
How many days can we pick as the 2nd element to avoid the birthday collision? 364.

In total, there are 365*364 ways.

To count the number of total configurations, we simply disregard the potential birthday collision.

Thus, there are 365*365 possibilities.

Now we can calculate the probability as the ratio of the number of desired outcomes and all possible outcomes.

In this case, the result is the following.

Summing up, the probability of two people sharing the same birthdays is less than one percent.

What about the general case?

Following the same logic, we can solve the general problem.

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

At n = 41, the probability is 90%.

Quite surprising, isn't it?

If you are curious, this is what the probabilities look like.

A few days ago, I posted this very same question, asking you to estimate the probability of shared birthdays, given 25 people.

These were your answers.

What can we learn from the birthday problem?

That our intuition about probability often fails hard. When asked, most estimate the chances of having a shared birthday among 25 people very low, even though the actual probability is more than 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 about the subject.

If you are interested in the details and beauties of mathematics, check out the early access!

tivadardanka.com/book

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling