Why you absolutely share the same birthday with someone else on Steemit! The Birthday Paradox, explained

in #mathematics8 years ago (edited)

The story goes like this: If you are in a room with x amount of people, what is the chance any two people in that room have the same birthday?

One question, so many layers. No one topic has incited more controversy in my own teaching over the years than this. This is because at the surface level, it is very intuitive to assume when more people are in the room there is a higher chance. However, the when my students learn exactly how much more of a chance, they absolutely flip out.

If you are in a room full of 23 people, there is at least a 50% shot of two people having the same birthday.


WHAAA?

To understand why, we need to grasp some basic ideas behind probability first.

I realize basic is something that is in the eyes of the observer, especially with mathematics, but this one is fairly nice to understand.

If you want to find the probability of an event occurring, you divide the number of outcomes favorable to you by the total amount of outcomes possible. The result is a fraction that would be between 0 and 1. A probability of 0 means the event would never occur, 1 would mean it would always occur, and anything in between marks how close the event would lie on that spectrum.


Image CreditBBC

A quick probability example using dice.

Say you want to find the probability that when rolling a single die you roll a number greater than 2. There are four numbers higher than 2 (3, 4, 5, 6), and six total possible outcomes on the die. Therefore, the probability is:

A compliment of an event is the opposite outcome desired. So, in our die example above, the opposite of rolling a number higher than 2 is rolling a number less than or equal to 2. There are 2 of these outcomes.

Note that for mutually exclusive events, an event and its compliment will always add together to make 1. This happens when there are only two possible outcomes, such as either being greater than 2 or less than or equal to 2.

This makes for the following convenient shortcut when finding compliments of events:

So, when calculating the chances of an event occurring, a very useful shortcut can sometimes be to instead subtract the chances of it not occurring from 1. In our die example above, we could have alternatively calculated the probability of a die roll greater than 2 as follows:

Compound events

When events are considered independent of one another, the probability of all events occurring is just a multiplication of all individual probabilities occurring separately. The key term there is independent, so the events can’t have an effect on one another.

A great example of this would be if we were to calculate the probability of flipping “heads” on a coin three times in a row. Since flipping heads once theoretically should have no influence on the next flip, the chances of flipping heads all three times is 1/8.

This should make sense because if a coin was tossed three times, there are a total of 2^3 = 8 possibilities. Only one of these includes tossing heads all three times.

The Handshake Principle - Counting off pairs of two people.

Picturing birthdays would be a whole lot nicer if they were coin flips instead of actual people and calendar events. With coins, for instance, it is trivial to calculate the total number of possible flips. With a room full of people pairing off to find out birthdays, it is a lot harder to calculate combinations that exist.

For this, we need to use the handshake principle, which is a formula that gives the number of handshakes, or pairs, possible in a room full of n individuals. For those that saw my piece on Pascal's Triangle, this number can be found in the second entry of the nth row. Otherwise, you can just use the convenient formula:

So, in a room full of 23 people, there are 253 pairs of two:

Finally! Time to do the math on a room full of 23 people!

First some assumptions.

For our calculations below, I will be assuming 365 days in a year, completely discounting the leap year. Also, we will consider the idea that birthdays are independent events, meaning we are randomly sampling pairs of people and the fact that someone has a birthday does not generally affect the birthday status of someone else. NO TWINS ALLOWED!


Sorry guys!

In a room of just two people:

There are 364/365 ways the other person does not have the same birthday as us. Pretty straightforward so far. So in this case, we take the compliment event of 1-(364/365) = (1/365) to be our chance of having the same birthday as someone else.

In a room of three people:

For no pair to have the same birthday, there are still 364/365 ways someone else would not have the same birthday as us. For no other person of the three to have the same birthday as one another, we have to first calculate how many pairs can be made of three people. Enter the handshake principle!

For the PERFECT case to happen where no combinations work out to the same birthday, we take the 364/365 ways a particular combination would not have the same birthday and then multiply that by itself over the total number of combinations in the group. Using an exponent to simplify, we get:

This represents the chance any two people do not have the same birthday. To find the chance they do, just take the compliment!

In a room of 23 people:

We just extrapolate out the process! We already showed earlier there are 253 combinations of two in a room full of 23 people. Again, assuming the 364/365 ways a particular combination would not have the same birthday as another person in the group, and using compliments, we get this absolutely MIND BLOWING result:

But wait, aren't birthdays kind of dependent?

I hear ya. What about twins? What about the chances that more than two people share the same birthday in the room? For this, we need to use dependent event logic to answer the question. For the sake of brevity, I will list this logic below:

  • The first person has a 100% chance of a unique birthday
  • The second has a (1 – 1/365) chance
  • The third has a (1 – 2/365) chance (all but 2 numbers)
  • The fourth has a (1 – 3/365) chance
    ...
  • The 23rd has a (1 – 22/365) chance

Therefore:

What does this look like for more people?

I'm glad you asked! Below are probabilities as percents, rounded to the nearest hundredth.

PeopleP(None the Same)P(At least 2 the same)
1100.00%0.00%
299.70%0.30%
399.20%0.80%
498.40%1.60%
597.30%2.70%
696.00%4.00%
794.40%5.60%
892.60%7.40%
990.50%9.50%
1088.30%11.70%
1185.90%14.10%
1283.30%16.70%
1380.60%19.40%
1477.70%22.30%
1574.70%25.30%
1671.60%28.30%
1768.50%31.50%
1865.30%34.70%
1962.10%37.90%
2058.90%41.10%
2155.60%44.40%
2252.40%47.60%
2349.30%50.70%
2446.20%53.80%
2543.10%56.90%
2640.20%59.80%
2737.30%62.70%
2834.60%65.40%
2931.90%68.10%
3029.40%70.60%
3127.00%73.00%
3224.70%75.30%
3322.50%77.50%
3420.50%79.50%
3518.60%81.40%
4010.90%89.10%
503.00%97.00%
600.60%99.40%
1000.00%100.00%
Note for 100 people, the true probability is 99.99997%, which rounds to the figure above to the nearest hundredth. True 100% is reached at 366 people

And, the obligiatory graph:

So, there it is.

As if you needed another reason to always be excellent to one another in all of your interactions here on Steemit, or really anywhere in life, this little wander into the mathematical woods should be another.

Remember, chances are, at least two of you were born on the same day!


Image Notes:

  1. Cover image source
  2. Duck GIF source
  3. Twins source
  4. Probability Graph Source

Sort:  

Im pretty sure you're off here. Unless im misunderstanding.

Youre saying that in a room with 100 people in it, the probability is 100% that at least two will have the same birthday.

But this is not true. IMagine that 30 were born in january (1 on each day), 28 on feb (again one on each day) 30 in march (agian one on each day) and 12 in april (again one on each day). Since there is a less than zero chance of 100 people in a room having precisely those birthdays, there must be less than 100% chance of at least 2 of them having the same Bd.

In fact, there are many ways I can arrange 100 people so that no two will have the same BD.

It seems to me that to get to 100%, you must have 366 people in the room, no? Thats the least amount of people that you can have where no possible arrangement would result in all of them having different birthdays.. With just 365 people, the odds would be 365! to 1 of having 365 different (there fore no same ) BDs (which granted is minute but still not 0)

IN anycase, upvoted for the brain twister.

The percentages were rounded to two decimal places for ease of reading the table, as I indicated above the table. Rounding, of course, sacrifices accuracy. Probability for 100 people is 99.99997%, which rounds to 100.00% at two decimal places. To reach true 100%, no rounding, you need 366 as you indicated.

To make this abundantly clear, I will add an addendum. Thanks!

im guessing this was probably apparent from the tails on the graph, which is fairly small on my phone.... carry on...

its kind of nuts that you get so much of the probablilty in the first 100

My grandfather used to always ask me this question before he passed away - "How many people do you need in the same room for it to be more likely than not that they share the same birthday?"

He loved mathematical puzzles. He grew up in India and had very little education - he worked for the railways from about the age of 10 until he retired.

He taught himself maths by buying second hand books and reading them at night. He was a whizz at calculus and algebra. He loved these kind of logical problems and conundrums.

It is sad in some ways that due to his situation of birth he wasn't able to maximise his potential.

I think he would have loved to have studied Maths at University but it just goes to show that an enquiring mind can still find a way to learn and take pleasure in maths.

Thank you for sharing this story. I know it sounds really corny, but I have always believed wholeheartedly in the power of math to bring people together through the fun of accomplishing a common goal. Especially for problems like this, when the fun comes within the counter intuitive controversies that arise!

I would agree. I think the problem is a lot of people get put off it at an early age. It is fun to solve problems. I still sometimes need to use algebra or logs as an adult and it is always fun.

Very nice and very clear post.

As I already told on steemit (maybe as a reply in one of your posts, maybe of someone else?), this recalls me the time where I was attracted by math, when I was 15. I was playing a lot with probabiblity puzzles at that moment.

Then physics got me :p

I love this stuff. Apparently, if people are queued to go into an empty room, and you want to be the first to match birthdays with somebody already inside, you're best off inserting yourself as twentieth in the queue.

Well...sort of. The math works out here for at least one connection in the room, not necessarily yours. But, its still a cool thought to have!

We need to find a way to apply the birthday paradox to the roulette...

Spolier alert - You will lose on the long run ;)

This guy disagrees: https://arxiv.org/pdf/1309.7608v1.pdf

I tried it out with a small program on Pascal to check it out, over the long run my initial chips are going down... there's a problem somewhere...

Nice breakdown of the math and reasoning. Keep it up.

Yea
Nice
Keep Steemin

Coin Marketplace

STEEM 0.32
TRX 0.12
JST 0.039
BTC 69171.86
ETH 3511.43
USDT 1.00
SBD 4.57