#birthdayparadox #probability #math #statistics #mathematics
The Birthday Paradox: What is it and how does it work? 🎉
You may have heard of the Birthday Paradox, but what exactly is it and how does it work? The Birthday Paradox is a concept in probability that states that in a group of just 23 people, there is a 50% chance that at least two people share the same birthday. This may seem counterintuitive at first, but it all comes down to the mathematics of probability and the sheer number of possible combinations of birthdays within a group.
To truly understand the Birthday Paradox, we need to delve into the world of probability and statistics to see how this counterintuitive phenomenon arises.
Understanding Probability
– Probability is the likelihood of a specific event occurring.
– In the case of the Birthday Paradox, we are interested in the probability of at least two people sharing the same birthday in a group.
How Does the Birthday Paradox Work?
– The Birthday Paradox comes down to the sheer number of possible birthday combinations within a given group of people.
– Even though there are 365 days in a year (excluding leap years), the number of possible combinations of birthdays within a group grows exponentially as the group size increases.
– This means that the likelihood of two people sharing a birthday becomes surprisingly high with a relatively small number of people.
Calculating the Probability
– To better understand the probability of the Birthday Paradox, we can use a simple formula to calculate the likelihood of at least two people sharing a birthday in a group.
– The formula for calculating the probability of at least one shared birthday is 1 – (365! / (365^n * (365-n)!)), where n is the size of the group.
Real-world Examples
– To put the Birthday Paradox into perspective, consider the example given: if you take a group of people born in a non-leap year, you would need 366 people for a 100% chance that someone shares a birthday, but only 23 people for a 50% chance that somebody shares a birthday.
– This striking disparity between the number of people needed for a 100% chance versus a 50% chance highlights the counterintuitive nature of the Birthday Paradox.
Implications and Applications
– The Birthday Paradox has implications in diverse fields such as cryptography, computer science, and social dynamics.
– Understanding the probability of shared birthdays can have practical applications in fields that rely on probability and statistics.
In conclusion, the Birthday Paradox is a fascinating concept in probability that defies our intuition. By understanding the mathematics behind this paradox, we can gain insight into the intricacies of probability and the surprising likelihood of shared birthdays within a group. Whether you’re a math enthusiast or simply curious about the quirks of probability, the Birthday Paradox offers a compelling glimpse into the world of statistics and probability.
In the end, we can appreciate the beauty and complexity of probability, which continues to surprise and captivate us with its intriguing phenomena like the Birthday Paradox. So, the next time you find yourself in a group of 23 people, take a moment to ponder the likelihood of two of them sharing the same birthday – you might just find yourself marveling at the wonders of probability. 🎲
For 2 people its 1/366 they share a birthday.
For 3 people. Its 2/366 (1 and 2 share a birthday or 1,3) + 1/365 (or 2 and 3 share a birthday)
For 4 its 3/366 (1,2 or 1,3 or 1,4) + 2/365 (2,3 or 2,4) + 1/364 (3,4)
Etc etc. Do this for 23 people and its around 1/2.
A person can be born in any 365 days. Now if you have another person, they have only 364 possible birthdays so they don’t match any. Third person has only 363 valid birthdays.
By doing this, you could in theory list all the possible alternatives.
Person 1 on Jan 1st, Person 2 on Jan 2nd , Person 3 on Jan 3rd. Hey they are different days!
Okay, how about Person 1 on Jan 1st, Person 2 on Jan 2nd , Person 3 on Jan 1st. Oh, now those two share a birthday.
List down all possible answers. If you have 23 people, and you list all the possible combinations, there are more of the combinations where two people are on the same day, than those combinations where they dont.
Luckily you dont have to list them all you can calculate it. Take the valid combinations and divide by the total.
(365*364*363*…*343) / (365²³)
Okay, so let’s take 23 people in a room and line them up, giving each one of them a number.
Person 1 is then going to compare their birthday to person 2, then person 3, and so on, all the way to person 23. That’s 22 comparisons.
Person 2 is then going to compare their birthday to everyone else in the line except for person 1 (because they already compared, they don’t need to again). That’s 21 more comparisons.
Person 3 will compare to everyone except 1 & 2, for 20 more comparisons. And you keep on going down the line until 22 and 23 compare birthdays.
All in all, you’re going to have 22 + 21 + 20 + 19…..+ 1 comparisons, a total of 253 comparisons.
Each one of those comparisons is going to have a 1/365 chance of having the same birthday. Logically, that also means that each one of those comparisons will have a 364/365 (or about 99.7%) chance of NOT having the same birthday. If you do something with a 99.7% chance of failing enough times in a row, eventually it’s going to succeed.
In this case, we can compute the odds by taking 364/365 and raising it to the power of 253. That comes out to approximately 0.4995, which means that there is about a 50% chance that out of all of those comparisons, none of them will have a matching birthday. And as you add more and more people, that 50% will keep dropping to smaller and smaller chances. But it’s only a 0% chance once you have 366 people, because that would account for every single day of the year, plus one, so there is no possible way for there not to be a match.
You’re thinking about comparing Person 1 to everyone else and looking for a match, but that’s not it.
You’re comparing Person 1 to People 2 – 23…and then *also* comparing Person 2 to People 3 – 23…and then *also* comparing Person 3 to People 4 – 23…and then *also* comparing Person 4 to People 5 – 23…and then *also…*
It ends up being a much, much, much larger amount of combinations than you thought it was.
The unlikiness of two people being born the same day is countered by the fact that there are a lot of days.
Person A and B have a 1/365 chance of sharing a birthday amongst themselves. There’s one possible match.
Add person C to the group, and then A can now match with B as before, but they can also match with C, and B can now also match with C. That’s 3 possible matches
Add D, and then A can match with B, C or D; B can also match with C or D, and C can also match with D. That’s 6 possible matches.
In fact, the number of possible matches increases like this:
(Number of people) x (Number of people -1) / 2.
For 23 people, 23 * 22 = 253 pairs of people who could possibly share a birthday.
With this number being more than half the days in the year, it wouldn’t be more likely to find a pairing that shares a birthday in the group than no pairing shares a birthday.
– Find a 20-sided die (a D20) and start rolling it.
– Every time you roll it, write down the number.
– If you roll a number that you have already written down, stop.
If you roll it twice, it’s pretty unlikely that there’s going to be a “collision”, because you’d need to roll the same number twice in a row.
But what if you’ve rolled the die 10 times already? At that point, it’s a 50-50 shot of rolling a number that you’ve already seen. Much better odds.
First, grammar FYI: it’s not really a paradox, despite the term being used. A paradox is a situation that contradicts itself. There is nothing contradictory about the birthday percentages, its just counterintuitive to many people.
Now to the actual situation. What throws people here is they tend to think only of a specific individual sharing a birthday rather than looking at all the possible pairs.
If you have 5 people in a room there are 10 possible pairings.
* A – B
* A – C
* A – D
* A – E
* B – C
* B – D
* B – E
* C – D
* C – E
* D – E
So even if A doesn’t share a birthday with anyone, the remaining 4 people still might. As the number of people increases the number of pairs increases even more so the possibility that at least two of them match increases more than you would think at first.
The math that goes to show the probabilities for matches gets a bit complicated so its often easier to look at this problem a different way:
What are the chances NO one in the group shares a birthday because there are two possible situations here:
1. No one shares a birthday
2. At least two people share a birthday
Those two events cover every possible situation (including everyone having the same birthday, which is obviously quite rare).
It turns out calculating #1 is super easy.
Lets start with two people.
The probability that 2 people do NOT share a birthday can be calculated as follows:
365/365 (choices for 1st persons birthday) * 364/365 (choices for 2nd persons birthday that is NOT the same as first persons).
The result is 1 * 0.9972 or 99.72% chance that they do NOT share the same birthday. Which makes sense., its a 1/365 chance.
Ok let’s move to 3 people. 365/365 * 364/365 * 363/365 (different than first AND second person).
That’s 1 * 0.9972 * 0.9945 = 0.9918 or 99.18% chance of not sharing a birthday.
Here’s a quick chart:
|PEOPLE|CHANCE NO SHARED BIRTHDAYS|
|:-|:-|
|1|1|
|2|0.9973|
|3|0.9918|
|4|0.9836|
|5|0.9729|
|6|0.9595|
|7|0.9438|
|8|0.9257|
|9|0.9054|
|10|0.8831|
|11|0.8589|
|12|0.833|
|13|0.8056|
|14|0.7769|
|15|0.7471|
|16|0.7164|
|17|0.685|
|18|0.6531|
|19|0.6209|
|20|0.5886|
|21|0.5563|
|22|0.5243|
|23|0.4927|
|24|0.4617|
|25|0.4313|
As you can see the probability of no one sharing a birthday because to decrease significantly the more people you add.
Once you reach 23 people the chance that NO one shares a birthday is only 49.27%, meaning the chance that at least ONE birthday pair exists is 51.83% or greater than 50%
The best way to think about it is to first realize that when comparing birthdays for 23 people you’re not just making 22 comparisons, you’re making 253.
Why’s that? Because you first compare Person 1 to the other 22 people, that gives you 22 comparisons. You then remove Person 1 and compare Person 2 to the other 21 people remaining, that gives you another 21 comparisons. You then remove Person 2 and compare Person 3 to the 20 people remaining, that gives you 20 more comparisons. You continue this until you’ve compared the birthdays of all 23 people with each other. 22+21+20+19….+3+2+1 = 253
This means that in order for two people to not share a birthday, ALL 253 comparisons need to have no matches. The odds of a single comparison not being a match are 364/365 = 0.99726027 or 99.72%. If you’re making 253 comparisons then the odds of every one of those not matching are (0.99726027)^253 which is 0.4995 or 49.95%. If the odds of no matches between 23 people are 49.95% that means that the odds of at least 1 match are 50.05%.
Ultimately, the reason the birthday paradox doesn’t makes sense at first glance is because people are assuming you’re only making 22 comparisons but when you really lay it out you realize that there are actually 253 total comparisons.
My work department has 23 people. There is one shared birthday. Mine.
I’ve never heard of this paradox but the numbers freaked me out
It’s a 50% that there is at least one match between 2 out of the 23 people. So for the first person there are 22 possible matches, for the second person 21 possible matches etc. the math works out to 50%.
There are plenty of excellent explanations here, so I’ll save you my explanation.
I will, however, share a fun fact about the birthday paradox. It is what’s called a *veridical paradox*.
A veridical paradox is a situation that produces a solution that seems entirely illogical, yet is objectively verifiable.
One of the more famous veridical paradoxes is the [Monty Hall Problem](https://en.m.wikipedia.org/wiki/Monty_Hall_problem). Upon first thought, it seems like a no-brainer that the answer is 50/50, but some simple math tells us that the answer is 2/3.
It’s not really a paradox. It’s just the way the math works out. It seems paradoxical bc human brains don’t naturally have a very intuitive sense of statistics.
This is a very interesting concept, but what happens to the odds if you include someone or more than one person with a 29-February birthday? I would think it would completely change the odds.
The thing you have to remember to understand this is that it isn’t the odds of let’s say, John, sharing a birthday with one of the other people. It’s the odds of *anyone* sharing a birthday with *anyone else.*
The intuitive (wrong) way people think about it is you have person 1 in the room. Then, as the other 22 people walk in, you check each of their birthdays against guy number 1.
That’s accurate but it’s missing a lot. You also check guy 2 against 3-23. Then guy 3 against 4-23 and so on all the way down the line. Put all that together and 50% actually seems kind of low.
23 people seems like nothing but think about the fact that it translates to 23C2=253 different *pairs* of people. Just one of these pairs needs to share the same birthday for the whole statement to be true.
Imagine you’re tossing pennies onto a chess board. Each one is moved to the closest square it lands on. How many tosses will it take for one to land on a square that’s already occupied?
For a 100% chance that you have a two-penny square, you’d need to throw 65 pennies. That way in the worst case, every square would have one penny and the 65th would be guaranteed to double up.
But think about what that scenario means – every penny until the 65th one has to land on a unique square. That’s super unlikely!
So at what point is there a 50% chance of at least one square having two pennies? The first throw has 0%. The next has 1/64. Then 2/64. Then 3/64. The sum of these probabilities will pass 50% (I.e. 32/64) after just eight throws, as 1+2+3+4+5+6+7+8=36.
This might seem like few throws, but remember that each new throw needs to avoid every previous penny. We’re not looking for the chance of a particular penny getting doubled, or a particular square.
I think of it like this: how many people would need to be in the room for one of them to have a 50% chance to share your birthday? It would be about half of 365. Now, if it’s a 50% chance for you to share birthdays with one of those people, what’s the chance for each of the other 130 people?
So, you need significantly fewer people in the room for any two people to share a birthday than for you to share a birthday. With 23 people, they each have a low chance of sharing a birthday with someone in the room (something like 2% chance), but there’s enough small chances in the room that it adds up to a 50% chance that two people share a birthday
You can simplify the premise.
Imagine asking 2 friends a number from 1 to 10 to see if they match, 1 comparison is highly unlikely.
Now imagine there’s 3. Now the previous 2 friends have to compare their numbers to the new guy, tripling the amount of comparison
Now imagine you have 4 people. Now this new guy has to compare his number to the previous 3 friends, bringing the total up by another 3 comparisons, total of 6!
Notice how this new guy has to compare themselves to old friends? This means that every 1 new person adds a lot of comparisons!
Now lets add a 5th friend. This means we get 4 new comparisons, and our total comparisons is now at 10 times!
The real math is a bit messier, but 10 comparisons to check against if there’s no duplicate is really hard to beat!
The way the numbers are presented also works for in favour of the paradox. You see 23 people as small and 365 as big, but 23 people gets you 253 comparisons!
Suppose you have a dart board with 365 zones and you’re about to throw darts until you hit the same zone twice. You’re just barely good enough that your darts hit the board, but at a random place every time. On the 2nd throw the chance of hitting the first dart is a measly 1/365 or 0.3%. But if you miss, that’s another zone you could potentially hit next time to double up. This snowballs until you have a 3% chance on the 11th dart all the way up to 6% on the 23rd. It’s a lot of small probabilities every throw, but they increase and add up! It works out that by this 23rd throw there is a 50% chance that at least one of the darts hit the same zone as another.