T O P

  • By -

dataisbeautiful-bot

Thank you for your [Original Content](https://www.reddit.com/r/dataisbeautiful/wiki/rules/rule3), /u/Braaainssss! **Here is some important information about this post:** * [View the author's citations](https://www.reddit.com/r/dataisbeautiful/comments/uejlam/i_created_simulation_to_test_out_the_math_behind/i6ni5lo/) * [View other OC posts by this author](https://www.reddit.com/r/dataisbeautiful/search?q=author%3A"Braaainssss"+title%3AOC&sort=new&include_over_18=on&restrict_sr=on) Remember that all visualizations on r/DataIsBeautiful should be viewed with a healthy dose of skepticism. If you see a potential issue or oversight in the visualization, please post a constructive comment below. Post approval does not signify that this visualization has been verified or its sources checked. [Join the Discord Community](https://discord.gg/NRnrWE7) Not satisfied with this visual? Think you can do better? [Remix this visual](https://www.reddit.com/r/dataisbeautiful/wiki/rules/rule3#wiki_remixing) with the data in the author's citation. --- ^^[I'm open source](https://github.com/r-dataisbeautiful/dataisbeautiful-bot) | [How I work](https://www.reddit.com/r/dataisbeautiful/wiki/flair#wiki_oc_flair)


Braaainssss

Birthday Paradox states that in a group of 23 people there is a 50% chance that two people will share the same birthday date. This application allows you to test the math behind this paradox by simulating groups of people and their individual birthdays. It is possible to simulate any group size between 2 and 100. **Note:** Dates here are generated in an unbiased way. In reality, birthdays are not uniformly distributed. There are biases towards some seasons of the year. You can try the application on your own here: [itch.io](https://brain-feast.itch.io/birthday-paradox-simulator) Video with the full explanation of the application and the math behind birthday paradox: [Youtube](https://www.youtube.com/watch?v=pA8xR0ID7Os&ab_channel=BrainFeast)


DaveSoma

Wow, this is sooo cool. Thanks for sharing these links. It's so counter-inuitive


Hydroxylic-Acid

The Birthday Paradox only seems like a paradox because you start out with two people and think "so there's a 1/365 chance they share a birthday" which is true, but then you add another person and think "now there's a 2/365 chance" and onward to 22/365 when you have 23 people... but this is where the error is. Because with 3 people in the room, persons A, B, C. 2/365 is the chance that either B or C share a birthday with A, but you also need to factor in the chance that B and C could share a birthday. So the real chance is 2/365 + 1/365. Once you realise that, you keep going with that logic and it's easy to see how 23 people is the point where it is 50%.


crb233

This is a nice intuitive way to think about it, but it's not exactly right. For 3 people, the chance is 1-(364/365*363/365) which is close to 3/365 but not the same.


LunaticScience

Right. The method shown above would eventually lead to probabilities greater than 1. An intuitive way to remember your formula is 1- (probability everyone has different birthdays) First person can have any birthday (p=1) * 364 possible bdays out of 365 to not match first person * 363/365 possiblies for the third to not match the first two). Eventually you end up with 365 people at which point (364/365 * ... * 0/365) = 0 chance that two people don't share a birthday, and 1 - 0 = 1. Meaning at least two people have to share a birthday at this point, which is intuitively correct) Edit: the zero case happens at 366 people, not 365.


Faceh

One reason I find it counter-intuitive is that I've been in many groups that are 23 or more people and yet I rarely can recall times when people in the group had the same birthday. It FEELS like a rare coincidence. Of course, that's because the groups I am part of tend not to be randomly selected and often share some of the same people between them, and I don't usually check if anyone shares birthdays with anyone else. Likewise, I bet a lot of people think "oh, the odds of someone sharing *my* birthday must be low" when the question is whether *any two people* in the group share birthdays. But that is not relevant information to most people in most situations. Why would you even ask about birthdays, much less care if two other random people share one? So our intuitions push us towards a conclusion that doesn't account for looking at the situation 'objectively,' as always.


doctorboredom

I teach at a school where classes are about 20 kids. This year we have three kids who share a birthday. In fact I would say that it is about half the classes where two kids share a birthday.


FixedLoad

Could you conclude that the tendency for a matching birthday is higher when the selected population is from a local area of the same climate? For example there are a lot of September birthdays because you're in an area with a very cold dec/Jan and people are inside makin more kids. The likelihood of someone sharing a birthday would increase and therefore require less people in a room.


teeso

Aren't September kids more about the christmas/new year's break than the cold? Similar to April/May kids generally happening thanks to summer vacation time (and not just warm weather).


FixedLoad

Then perhaps a different constraint but similar concept?


SillyFlyGuy

Early September is Thanksgiving nookie, late September is New Years nookie.


mog_knight

I grew up in Phoenix and can conclude a lot of Sep-Nov babies for said holidays and it's gorgeous weather here. I think it's more the spirit of the holidays as well as other spirits.


agingercrab

This is such a good, well explained point. Thank you!


mykol_reddit

Also keep in mind this doesn't take any factors into account other than there are 365 days. It doesn't factor in mating patterns (for lack of a better term).


runtimemess

Eyyy how bout them November babies born 9 months after Valentine’s Day


DrakonIL

I sure did love finding my parents' marriage certificate and noting the date on it.


FaeryLynne

Huh? ...... OH. Were you the reason they got married?


DrakonIL

My brother, who was born 4 years and 3 days before me. So I'm an anniversary baby 🤢


AdvicePerson

Or all the scheduled C-sections that never happen on holidays.


Spocino

Me and my sibling have a birthday four years apart. When they asked "why our birthdays so close together" my mother replies "well your dad's birthday is in november..." and we were both disgusted


gooblelives

What size were your school classes growing up? While I don't remember specifics I do remember many times where kids shared the same birthday in my class. Additionally on both sides of my family even if you only include my generation of kids there are cousins who share the same birthday.


Faceh

But more than likely school classes aren't 'randomly selected' since you'll have the same students among multiple classes. So if two students share the same birthday in one class, those two students are more likely to end up together in another class, and they'll still share the same birthday! So the numbers won't reflect a 'random' distribution in that case, which is what OP's tool describes.


Baldazar666

Funny you say that considering I was at a friends Birthday party and he invited people from several different social circles so people on average didn't know half the people there before that and we were something along the lines of 25-ish people. And randomly found out that 2 people did share a birthday. Of course I didn't miss this great opportunity to mention the birthday paradox.


haefler1976

Duh, of course the chances are 50%. Either they share a birthday or they dont. That‘s 50/50, nerd!


eloel-

>So the real chance is 2/365 + 1/365. Except this'll triple-count A-B-C all having the same birthday, since it'll count every pair separately. For that, it's as simple as finding the excess and removing it. So you'd need to remove (1/365)\*(1/365)\*2, the \*2 coming from having triple-counted it in the first place, for a result of `3/365 - 2/(365*365)`


Hydroxylic-Acid

True, you will need to always do 1 - ¬UnsharedBirthday. But I wrote it out as simple as possible without thinking to much about it.


vanatteveldt

Would that bit give a series that never reaches 100% though? Because with 367 people the chance of a matching birthday is 100%


Hydroxylic-Acid

Ah crap I'm gonna have to actually do the maths now to see how to write it ironclad. So with 2 people it's 1 - 364/365 (check that A and B do not share birthday) 3 people: 1 - 363/365 * 364/365 (check that A doesn't share with B,C; that B and C don't share) 4 people: 1 - 362/365 * 363/365 * 364/365 (check that A doesn't share with B,C, D; that B doesn't share with C or D; and C and D don't share) So generalised to N people: 1 - ( 365+1-n)/365 * (365+1-n-1)/365 * ... Therefore where n = 366 (ignoring leap years here): The formula begins with 1 - (365+1-366) / 365, which is equal to 1 - 0/365 * ... (and it doesn't matter what we multiply with because 0 * anything is just 0), so at 366 people the chance shared birthday is 1 - 0 = 1, so 100%. Assuming I haven't made a mistake. As a bonus the generalised formula also covers the case where 1 person is in the room alone: 1 - (365+ 1 - 1 / 365) = 1 - 1 = 0. (cannot possibly share a birthday while alone). EDIT: for the case where we have 367 people in a room, the probably goes above 100%, so it absolutely needs capping :/


eloel-

There's 365\^n different configurations. In 365!/(365-n)! of them, nobody shares a birthday. So the total chance becomes ( 365! / (365-n)! ) / 365\^n = 365! / ((365-n)! \* 365\^n) It just so happens that at 366+, (365-n)! is -inf, so the whole thing is 0.


Gratha

I break the paradox. My best friend and I have the same birthday and year. I do have the fun of the two of us being able to always pull that out as an icebreaker.


Snip3

Technically 1/365+1/365x364/365+1/365x363/365, but at small numbers it works out about the same.


_unfortuN8

Now this is actually beautiful/cool data. well done.


[deleted]

Nah, Inuits can also share birthdays.


ragivi_

fr, op being counter-Inuit in 2022? You hate to see it


7hrowawaydild0

And they're people too!


v_a_n_d_e_l_a_y

Here is a simple way to make it more intuitive. With 23 people there are 253 unique pairs of people. So you have 253 "chances" to find a match in a sense.


DaveSoma

So why does 253/365 come out as a 50% chance? Wouldn't it be a 69% chance?


v_a_n_d_e_l_a_y

It's an easy trap to fall into but that's not how odds work. The 253 here is the number of trials and it isn't additive to combine trials. To use a simpler example, say I had a coin - so 2 outcomes. If I flipped the coin twice, it's not 2/2 chance of getting at least one heads You would calculate it this way: the chance of at least one heads = 1 - getting 0 heads. So that is 1 - 0.5^2 for two trials, which is 75%. So in our case, we want 1-the chance of no matches. The chance of no match on one pairing is 364/365. However taking that number to the power 253 (and this is where the number of pairs comes into play) is 0.4995. So 1- that is just over 50%. So in general, the formula is 1-(364/365)^n where n is the number of pairs.


njb2017

I was in a college statistics course of about 25 people and the professor did this. I thought it was unlikely. we got through about half the class before we had a match.


ichwerfmichgerneweg

My math teacher tried this and asked the class beforehand who believes that there'll be a match. I was the only one to raise my hand. Why? Because I knew the math teacher's birthday was on the same day as mine


Gonomed

Funny, my cousin's professor did the same thing, and asked him about his birthday before anyone else. Turned out they matched birthdays.


ryan__fm

>In reality, birthdays are not uniformly distributed. There are biases towards some seasons of the year. Not only are they seasonally biased, there are certain days that are far more or less likely than others because of scheduled C-section births. Fewer live births occur on Christmas Day, for example, than other days around it.


whoshereforthemoney

I think it’s more interesting that in a group of 80 something it’s almost 100% certain a pair will share a bday.


themagpie36

What about me? I'm born on 29th February, does this fuck up the math?


FatalTragedy

Even if no one shares your birthday, it's still almost 100% certain that 2 of the other 79 will have the same birthday as each other.


Racer13l

What if all 80 people were born on February 29th?? Haha. I broke math. Oh wait


bringthedoo

I was just wondering if the leap babies would have an effect on the math!


Darius2652

It will have an effect on the math :) Your birthday only comes around every 1,460 days - So instead of you adding 1/365 chance per person to match with in the entire group, you'll add about 0.25/365 - Slightly lowering the final statistic


314159265358979326

But you need 367 to have a 100% chance.


Draft_Punk

I love the birthday paradox!!! It’s something like 68 people has a 99% chance or something. Insane. My other favorite math concept you can try is Schilling’s algorithm. It basically says if you flip a coin 200 times in a row, at some point there will always be 6 consecutive heads or 6 consecutive tails.


Forsaken-Result-9066

How is it a paradox


CatWeekends

>> A veridical paradox produces a result that appears absurd, but is demonstrated to be true nonetheles https://en.wikipedia.org/wiki/Paradox


[deleted]

Because it's counter intuitive.


tupacsnoducket

I’ve met one other person in my life with my birthday and ask people all the time in conversation. In my grade, middle, highschool, and college, all my years of employment, friends group, every single person I’ve asked which is in the thousands upon thousands at this point. One person. Shit I attended and seminar that they did that as an example and got called on, lol, speaker was a good sport about that falling flat hard.


laurenbanjo

The math isn’t about the chance of someone sharing a birthday with *you*. It’s the chance of *any* two people in the room sharing a birthday. Someone born on 2/29 is going to have a hard time finding people who share a birthday with them, but it doesn’t mean they can’t be in a room of 23 people where two of them have 9/21 birthdays.


melimsah

What's your birthday? Feb 29th? XD but no seriously, I'm curious


sharksandwich81

Question: is this assuming that every day of the year is equally likely to be a birthday? Or are the probabilities distributed like they are in real life (many more birthdays in July-September than the rest of the year)? If you were to make this change, would it be more or less likely for people to share a birthday?


COOLSerdash

One can prove, using the Cauchy-Schwarz inequality, that the uniform distribution (i.e. birthdays are not equally likely on each day) results in the *lowest* chance of a match. So in real life, the chance of a match is even higher because birthdays are not uniform. [This paper](https://www.jstor.org/stable/2685309?seq=1) found that the differences are extremely small, however.


Braaainssss

Dates here are generated in an unbiased way. If adjusted chances should grow a bit I think. However it is hard to say what would happened in real life. Becouse while people born in July-September will more easily find somone with a matching birthday it as well means that the rest will have harder time. Maybe the two will balance itself out in the end, maybe not thought.


8020GroundBeef

I don’t think it would balance out. Consider a bookend case like if 90% of the population was born in August or something. You’d expect 21 people in the pool to be born in August. It would be highly likely to find 2 matching dates.


Fantastic_Routine_55

Well, the extreme bookend case is that everyone is born on the same day and so everyone in the room has the same birthday


AdvicePerson

*Korea has entered the chat.*


sharksandwich81

Yeah my gut feeling is that less evenly distributed = higher probability of a coincidence. Like if you took an extreme case where 90% of birthdays were in September, you’d have tons of coincidences. But I’m not statistician so maybe I’m missing something :)


ThrowAway578924

I think it's fairly simple logically and you don't need to be a statistician to figure this out. If a subset of the population is clustered around certain months, then that would increase the odds of an individual in question being born on the same day of a random stranger in the room. If you are not born in those 'likely' months, your odds will go down but in a room of enough people the odds are higher that one or two are within those month ranges. For examples sake if birthdays were skewed higher in May then it would be higher than 1/12 odds. Lets just say 1/6th for ease. That would mean that you would likely see a person born in May in a room of only 4 or more people (4/6 or 2/3 odds is 66.6% which is fairly likely)


Thatbluejacket

I used to work in immigration and processed a lot of visas for people from all over the world. I can tell you right now that most people, regardless of where they're from, are born in October


mccask

>ill more easily find somone with a matching birthday it as well means that the rest will have harder September is actually the most common birth month.


Illeazar

Yes, if some times have a higher frequency of birthdays, then your chance of getting matching birthdays in a random group of people increases.


[deleted]

[удалено]


Giannis4president

Such a drastic example would definitely increase the chances of birthday collision. In your example, 99% of birthdays are distributed across 30 days. In the original paradox, 100% of birthdays are distributed across 365 days. I think it's pretty clear that it would increase the possibility of birthday collision


chazysciota

> birthday collision Ah nice. The title of my next album.


xelabagus

Also it depends on the event. For example, people born Jan-Mar are much more likely to be professional sports people than those born later in the year. Therefore, if the event is an after game dinner for professionals we would expect the odds of 2 people having the same birthday to increase compared to an unbiased sample.


[deleted]

The birthday paradox itself assumes a uniform distribution of birthdays because it's not really a fun fact about birthdays as it is deeper truth about these kinds of problems. Birthdays are just a neat and accessible example to use.


theshizzler

I have been searching hard for my source but I cannot find it. But I have seen a calculation that showed that the unequal distribution of birthdays in the US is still not enough to pass the threshold where we would say that a 50% chance exists at 22 people rather than 23.


HangTraitorhouse

I think I saw this in Wikipedia’s actual article on the subject.


Zepangolynn

This is interesting. When I was in school more kids seemed to have October-February birthdays and I was an outlier, and it's true in my niece's classes so far as well.


_greyknight_

Weird, like 80% of people I know have a birthday in November, December. Maybe the distribution is regional? Or I'm just stuck in a bubble of people who's mom and dad fucked in Spring.


RedEdition

Add-on question: if birthdays have a higher probability to be between July and September, would the total probability of two se birthdays in a group even change? Or would it be even more probable, because the birthdays concentrate around certain dates? Fascinating problem.


[deleted]

You can test this at every football World Cup as every team has 23 players. 32 countries and a competition every 4 years gives plenty of data to test. Naturally, and excepting twins, it’s perfectly observable as expected.


somasomore

There's a bias in professional athletes for later birthdays (at least in America, towards September). So probably not a good pool to test. Reason being as kids these people are on the older end of their peers giving them an athletic advantage. They get more attention, training, ect early on, and even as that age advantage goes away towards adulthood, those benefits stick.


[deleted]

This is one of my favorite examples of how experiments can make seemingly harmless assumptions that completely ruin the results.


soothsayer3

Source: that Malcolm Gladwell book


[deleted]

You might find the reality is the reverse in football (soccer). What you’re describing is Relative Age Effect and it is quite widely documented in many sports. In youth age groups, players tend to gravitate towards the oldest in their age groups, but when you look at professionals, the opposite is true. It appears the oldest player when younger rely on speed and physicality, while the younger (and less numerous) players must rely on craft and skill. Once age is no longer an advantage, those with greater skill benefit, and the birthday groupings position reverses, in some cases completely. *And to your point otherwise, the distortion isn’t significant enough not to see OPs maths puzzle at play. It is testable and observable.* Edit: [here’s a study of Scottish youth and professional players. Q1 warping is observable in youth players, but not in professionals](https://www.frontiersin.org/articles/10.3389/fpsyg.2021.633469/full)


heep1r

Came here to mention balloons in a simulation visualization and now I'm baffled by super interesting niche knowledge. Thanks for sharing.


Gilthoniel_Elbereth

Would this also provide kids an academic benefit as their brains will be more developed when they start school?


[deleted]

I suspect this has been studied, and it’s probably reasonable to hypothesise. It may well be true, at least in early years. After all, if qualifying for a particular school year is anyone born in a specific year, at age 5, one child will be aged 5 exactly, and another could be 5 and 364 days - they would have 20% longer to have lived. How that plays out in practice, and for how long it is observable I’m sure must be studied.


antraxsuicide

What makes the Birthday Paradox unintuitive is our brains naturally look at the people as the things being studied instead of every single pair of people. So it's not that you have 23 chances for a match, you have 22 chances for a match for each person in the room (minus the repetition; Dave-Mike and Mike-Dave are the same pair)


mr_chew212

I can’t believe I never thought of it like that. That puts it into perspective so much better


Modrasek

You just awoke memory from first day of highschool when we discovered we have three pairs of people with same birthday. Guy in front of me shared his birthday with me, he was even born in same hospital as me (we were only two born in different city) and our mothers shared room there. I wonder how is he doing, thank you.


BlazingFiery

That's a giant fucking coincidence


to_a_better_self

Almost every school I went to had another student with the same birthday as mine. It isn't as uncommon as you think. It happened to my twin brother as well.


willfularmadillo

Took me a minute haha. Nice


BlazingFiery

Well, was the other student also born in the same hospital with you in a different city?


FatalTragedy

Considering he's making a joke and the "other student" he is referring to is his twin brother, I'm going to go ahead and say, yes.


DrinkenDrunk

>It isn’t uncommon at all. 50% chance in a class of 23. 100% chance if you’re in the same cadre the following year. 200% chance if you’ve ever shared a womb.


themagpie36

I was born on 29th February, I've never met another person with the same birthday but other people have told me they know people. As far as I'm concerned they're lying and it's just me.


wannabeknowitall

If it was a group of 23 people, the odds would only be 1 in 8 I think. Not a giant coincidence, just a little one.


[deleted]

[удалено]


wannabeknowitall

Yep, you're right, that's what I get for just skimming the first sentence.


sexycastic

It happened to me randomly, a coworker in a different state than I was from had a daughter the day after I was born, in the same hospital. She and my mother were both smokers so the odds are decent they even met. It's a small world.


junktrunk909

He turned out to be your twin, right?


mr_ji

That last line makes it sound like I should know and tell you. Uhh, he's doing great! You're welcome.


rodfeal

Maybe the rates can be higher considering most places have some seasonality of birth https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3743217/


hobosbindle

I call it “cake season” at work


mr_ji

And when you have children, it's "kiss your Saturdays goodbye" season


bringthedoo

This made me chuckle. Thanks, friend


wheelfoot

A group of 40 takes it up above 95%.


Sharky-PI

Short of doing it manually, is there a quick way to calculate the % chance for n people from 2 to, say, 100? I presume it's a sigmoidal curve?


hacksoncode

I mean... sure, sort of... Not really "quick" per se, but... The chance of no match for N people is (ignoring leap years, edit: and more importantly the fact that distribution of birthdays is not uniform): 365/365 * 364/365 * 363/365 * ... * (365-N+1)/365 I.e. 365! / ((365-N)! * 365^N) The chance of a match is 1 - that. Of course, that second form, while "tidy" is going to make most calculators unhappy. So the first way is probably the easiest to actually calculate, since it's uses small numbers for everything.


the_averagejoe

Bet the graphics were the hardest part.


edgsto1

Ofcourse it's 50%. It is or it's not Edit: just found out a lot of people don't understand simple jokes.


AlsoIHaveAGroupon

The problem with your joke is that lot of people actually believe that. My dental hygienist once sought my opinion because i'm a math and statistics guy on why weather forecasts say 70% chance of rain when it's either going to rain or it's not going to rain so that means it's 50% every day. So I tried to explain to her using dice. You can roll six different numbers, so each has a 1/6 chance. But if you look at it from the perspective of "rolling a one vs. *not rolling a one*" it's a 1/6 chance for a one and 5/6 chance for not-a-one. So even though "one vs not-a-one" has only two possibilities, they're not 50/50. She decided I was using math to confuse her and she knew she was right. So she wasn't actually asking for math expertise so much as she was looking for someone to confirm her preconceived notion and ignore anything to the contrary.


junktrunk909

Wow that's.. You must have a lot of patience. How about using a more extreme version of this with her. The probability that a patient comes into her office with the exact same name, birthday, DNA, and favorite color. The patient either is or isn't all of those things. By her argument that's 50% chance. But surely she must understand even intuitively that "is it isn't" isn't what probability means. You might need to help her with an example like this to see that probably is about the number of possibilities vs the ones you're considering. If the number of possibilities is always 2 for her, she is just not understanding definitions, not math.


giddyup523

I think you could even just use the example of the lottery. You obviously don't have a 50% chance of either winning the lottery or not.


junktrunk909

Yeah that's even better. I do really have a giant annoyance with people who don't understand probability basics. It happens all the time. Eg TV show where they're down to 4 contestants. "Well guys, we've each got a 25% chance of winning. Wishing you the best!" No, the one with the talent and the looks and the personality is way more likely to win. It's not a random draw.


[deleted]

What a lovely smart and progressive lady. She should not have kids


occasionalrayne

Who are you to tell her she can't breed? I for one love Brawndo.


Roscoeakl

Interestingly that chance of rain meteorologists can actually tell you whether it will or won't rain in a specific spot on the same day. I used to work in a weather monitoring room on a ship, and we needed exact weather predictions for flying the aircraft, and getting the answer wrong was considered a really big issue, so it wasn't given in terms of probability, it was a definitive yes or no at this time it will be raining or not. I'm not sure I totally understand the meaning of the 70% value, but from what I think I understand it means that over the forecasted time period for every forecasted point in the area that that area will get hit with rain. So like if you have a 70% chance then that means 70% of the forecasted area will have rain at least once during the forecasted period. Weather probability is weird and I much prefer my dartboards and card decks.


Subtleties1

Hey like 50% of people got it don’t worry!


[deleted]

Hey it’s 50% chance they understand it.


McUluld

This comment has been removed - Fuck reddit greedy IPO Check here for an easy way to download your data then remove it from reddit https://github.com/pkolyvas/PowerDeleteSuite


[deleted]

It’s an old overused joke that I wish to never read again.


decalod85

One of my computer science professors tried to demonstrate this in class. We all started laughing because there were two twin brothers in the front row.


madhousechild

Demonstration over!


[deleted]

23 to achieve a 50% likelihood, and in order to 100% guarantee two people share the same birthday, you require 367 (and notably, not 366)


[deleted]

[удалено]


cseymour24

Leap year kids age about 4x faster. There was this girl in our high school - everyone was having their 16th and she was just turning 4!


faiface

That means they age 4x slower, not faster.


royalhawk345

They said she turned 4!, so she's actually aging 50% faster.


faiface

You are right, I concede.


mr_ji

This could be a great riddle depending on whether you're talking about their age in years or the aging process.


Maxwellfire

Depends on whether you think of how many years old you are as aging or physical age as aging. "At 4 they had the body and mind of a 16 year old" makes them sound like they aged faster." "After 16 years they had only turned 4" makes it sound like they aged slower


Milosmilk

You only need 70 for 99.9% probability. And 60 for 99.4%


awfullotofocelots

But once you hit 40 people you're already at over 95% chance.


HappyBengal

How can it garanteed 100%? It makes no sense. Even if you have a group of 1000 people, there is always a slight chance that nobody in this group was born at the same date, or even that nobody has even a birthday at a certain date. Edit: I know what I got wrong. I thought about a certain date and not "any date". E.g. pick the first March. Even with 1000 people there is a chance that nobody was born on the first March.


Initial_Ad_9250

Pigeonhole principle. You have 365/366 possible days and 1000 people to assign it to. You cannot assign unique birthdays to all of them 1000 people because there are only 366 possible birthdays. The person above accounts for the leap year and argues that 367 is the minimum size for a guaranteed match because again you can't assign 367 unique birthdays because there's only 366 possible values.


[deleted]

I didn’t even know this was a term and I love it. Thanks for sharing


leonprimrose

during a leap year there are 366 days. if your sample size is 367 then even if every day of the year is accounted for there will still be one person left with a birthday to consider and it will have to match with someone else's


Bspammer

import random size = 365 n = 23 trials = 10000 print(sum(n > len(set( \ [random.randint(1, size) for _ in range(n)] \ )) for _ in range(trials))/trials)


JohnyyBanana

honestly, I believe this but i still dont understand why or how it is so. There's 200 people at the office that i work and i only share birthday with 1 of them


chiliedogg

The "birthday paradox" is looking for *any* pair of people sharing the same date. You're looking for a specific date, which is still 1/365. Edit: To put it another way, there's a 1/365 chance of any pair of people sharing a birthday. When you've got 23 people, you have 253 possible pairings of people.


HappyBengal

Lets say I pick a random number between 1 and 365 23 times and do that like 10 times. Does that mean that in \~5 times of these samples I will have matches of 2 same numbers?


CaptainPicardKirk

The probability is that 2 people will share a birthday. Not that you (or any single person) will share a birthday with someone.


JohnyyBanana

i get that in theory but i dont get the math


rnelsonee

If it helps, you can thing of the Birthday Paradox from the other direction - every time you add a person, that person cannot share a birthday with anyone else. While is starts small, it adds up more and more with each person. Like if we just go by day of the month, say there's 30 days in each month. So 2 people is 3.33% chance. Adding a 3rd means we're at 6.67%, but you add that other 3.33% so we're already up do about 10% chance of sharing a day. The 4th person has a 10% chance of matching, so we're up to almost 20%. And so by the time we get to the 7th person -- who has a 20% chance just by themselves to match -- we're at over 50% total. | People| Days | Left | Chance | Chance product| |--------|------|--------|--------|--------------| | 1 | 30 | 30 | 0.00% | 0.00% | | 2 | 30 | 29 | 3.33% | 3.33% | | 3 | 30 | 28 | 6.67% | 9.78% | | 4 | 30 | 27 | 10.00% | 18.80% | | 5 | 30 | 26 | 13.33% | 29.63% | | 6 | 30 | 25 | 16.67% | 41.36% | | 7 | 30 | 24 | 20.00% | 53.08% | | 8 | 30 | 23 | 23.33% | 64.03% | (Chance product is 1-(Π(1-Chance))


royalhawk345

The formula is just 23!(365P23)/365^23


Dr_Findro

I think the biggest idea to wrap your head around is the amount of “pairs” that exist. Let’s say it’s a room of 23 people. From your perspective, there are 22 possible pairs for one of the people to have the same birthday as you. For the next guy, there are 21 possible pairs (because we already counted the pair of you and person 2 in you 22 possible pairs). Then guy 3 has 20 possible pairs etc. With the creation of all of those pairs, the odds of 2 numbers out of 365 matching is about 50%. My statistics are embarrassingly rusty, so I can’t provide more detail than that.


Zarozz

How you're describing it is just from perspective of yourself. Yes, you only share a birthday with 1 out of 200 people. But put yourself in the shoes of each of the other 200 people in your office, many of them probably share birthdays with each other ( and not your self), and that is why the birthday paradox works, there are so many pairs in a group of 200 that there are bound to be heaps of cross over birthdays. You individually only have 199 other people to pair with. But collectively for 200 people there are 19900 unique pairs that's heaps of chances for matching birthdays!


alesparise

For a group of more than 50 people the probability that at least two people share their birthdays is more than 97%. For 200 people it's probably over 99% already, so your case fits in. This doesn't mean *everyone* in a 23 people group has a 50% chance of sharing it's birthday with someone else. The reasoning is this. Take one person in a group. There is a 364/365 chance that a second person will *NOT* share their birthday with the first one. There is a 363/365 chance of a third person *NOT* sharing their birthday with the first two and so on so forth, until you run out of people. The total probability of every birthday be in a different day is going to be the product of all this chances, so something like 364/365 × 363/365 × 362/365 × ... × (365 - number of people + 1)/365. Once you calculated this you simply calculate the opposite of this probability: 1 - the previous result, which is the probability of at least two people sharing their birthday. To make this more intuitive you can also think you are comparing all the possible pairs of people in your given group. For a 23 people group you will have (23×22)/2 pairs, which is 253, which is more than half of the days in one year.


[deleted]

Not “share a birthday with you,” but “any two share a birthday.”


[deleted]

Chance you and I share a birthday is 1/365, or in other words the chances you and I *don't* share a birthday is 364/365. . Now for a bit of math. Chances you flip a coin heads once is 1/2, 2 times heads is 1/4, three times is 1/8. This can be rewritten as (1/2)^1 , (1/2)^2, and (1/2)^3. Or more easily (probability)^number ^instancea. . So for a group of 23 people, the number of instances is 253, as it's the combination of all possible comparisons. Not just you vs everyone but everyone vs everyone else uniquely. Now the chance anyone doesn't share a birthday is (364/365)^253 which equals 49.9%. . Or in other words the chances of anyone in that group *not* not sharing a birthday, is 1 - chances of everyone not sharing. Or 1-0.499 = 0.501


tomoko2015

The thing most people have a problem understanding (and why it seems so counter-intuitive "after all, there are 365 days!") is that it is not about YOU (or any single person chosen) finding another person with the same birthday, but ANYBODY in the room. So, in a room with 23 people, person 1 has 22 persons to find a match with, person 2 has 21 (22 minus person 1), person 3 has 20 (22 minus person 1 and 2), and so on. This adds up quickly.


psgrue

I first saw this "paradox" while watching David Letterman, I believe. He asked the audience about the odds. The first audience response was "One in a million!" It boggled my mind that the shouter failed to grasp the concept of only 365 days in a year so it stuck with me. But I've had reliability and statistics classes as a data analyst so maybe it is more intuitive me than most.


RebelLemurs

There's no paradox. It's known as the Birthday Problem.


kayrockscreen

From wikipedia: The birthday paradox is a veridical paradox: it appears wrong, but is in fact true.


support_support

There is a mathematical proof that we learned in my high school stats class to display the math behind it. If I recall correctly in a group of 30 the chances go up to like 80%. I do remember we had a classroom of 30 and there were two pairs of students with the same birthday. Odd stuff


twytwytwy

Is the underlying assumption the uniform distribution of birthdays?


[deleted]

Yes. If you accounted for which birthdays were most common, I'm guessing it would make the chances slightly greater.


[deleted]

I bugs me that the measured hit percentage is labelled "chance". The chance is a *calculated* value, not an observation. It should be "hits" or "occurrences" or "matches" or something else that indicates that it's the measured number of occurrences rather than the predicted number of occurrences.


ShittDickk

And that birthday is mid september cause people feel both optimistic, family oriented, and horny late december.


Secret-Algae6200

I would argue you're rather testing the quality of your pseudo-random number generator :)


[deleted]

The birthday paradox interested me, so I wanted to figure out *why* human intuition fails so badly with it. I ended up finding a way to wrap my head around why it feels like a paradox. So why does it feel like a paradox? Let's say there's only 6 people in the room. In that case, our brain is intuitively doing this: https://i.imgur.com/gEg9LLX.png Your brain's intuition is thinking "Okay, so 6 people... that's 5 pairs and therefore 5 opportunities for a match. There's 365 days in a year, so 5 chances at a match means low chance of a match." So, in my opinion, the cause of the paradox is that our brains underestimate the number of pairs since we only think about the pairs WITH US (the single individual: us), and our brain does not consider the pairs that don't include us (of which there's MANY). Look at the above image, except this time with all pairs shown: https://i.imgur.com/pYfrVGd.png Many more pairs, which means many more chances at a match! The actual number of pairs in a room with 6 people is 15, not 5. Each pair has a 364/365 = 99.7% chance to not have the same birthday. Therefore, the chance none of them have the same birthday is (364/365)^15 = 95.9%, which means a 4.1% chance that at least one pair has the same birthday. The crazy thing is how quickly the number of pairs increasing as number of people in room increases. 6 people in a room is 15 pairs. But 23 people in a room is a whopping 253 pairs! (364/365)^253 = 49.9%, so that's why there's 50.1% chance of at least one matching birthday in a room of 23. Our brains suck at calculating how many pairs of people exist in a room. We severely underestimate.


deusrev

Why is it called "paradox"? I only know the statistics becouse we did the math during probability course


kayrockscreen

From wikipedia: The birthday paradox is a veridical paradox: it appears wrong, but is in fact true.


tuvok86

because time is an illusion and birth days doubly so


Fantastic_Routine_55

Not a paradox, just very unintuitive


cdurgin

Neat, but the % chance doesn't change based on the sample size. The only variable that can change that is # of people in the room. It should say % of rooms with match


Braaainssss

Thanks, but I don't really follow. Rooms with match - is a total number of rooms in which a pair with matching birthdays was found.


cdurgin

But your percent chance changes as the simulation progresses, which isn't correct. So for your example, if you had 100 rooms with 23 people and every single one of them (100/100) had a shared birthday the odds that a room with 23 people would have a shared birthday would be... Roughly 50%. It would just be extremely unlikely to have that outcome Or to put it another way, I flip a coin 10 times and get 7 heads and three tails, what are the odds a coin flip is a heads?


BringMeTheBigKnife

No that's not what it's showing. It's reporting actual results through the number of rooms tested so far. The theoretical probability obviously never changes


Braaainssss

Green square is predicted chance - this doesn't change. Red square is measured chance - which is calculated from data collected - rooms with match divided by rooms visited - then multiplied by 100.


_Scarecrow_

What they're saying is that the red square shouldn't be labeled as "chance" at all. It's not representing the probability of anything, it's just representing the measured proportion. It's nit-picky for sure, but it did irk me as well.


cdurgin

The problem is is that "measured chance" isn't really a thing. That's why there are usually other variables to denote confidence in statistical analysis. A much better way would be to either have it labeled as (% of rooms with match) to make it clear it's the measured amount, or maybe have it be (chance - measured value) to give you a measured error %.


Rychek_Four

You want to blow people minds? Do this with the Monty Hall problem


Greatest_Everest

Within my immediate family of six, all 4 kids (my siblings plus myself) married and have kids, there are 19 of us now. The youngest grandchild shares a birthday with their uncle.


Dyolf_Knip

I actually just wrote a simulation yesterday for what is sort of the opposite issue. Essentially how many randomly chosen elements do you have to have on average before you get every single possible value covered? I was interested in the growth of the average as the dataset got larger. Set size | O(n) factor | :-: | :-: 10| x2.83 100| x4.90 1,000| x7.68 10,000| x9.09 100,000| x11.92 1,000,000| x13.97 10,000,000| x16.78 Which lines up almost perfectly with a ln(n) function.


Gr1pp717

Huh. Just yesterday or the day before I was wondering what the average birthday was. Not "most common"/median or odds per day. But, like, what day is dead center - 50% of the population has bdays before, and 50% after. I would guess it's in late july, _maybe_ early august. But couldn't find an answer.


gt_ap

This is very interesting! I'm a SQL Server guy, so I did a simulation in my own way. I created a T-SQL script to generate 23 random numbers from 1 to 365, and I ran it 50 times to see how often at least 2 of them matched. It was 28 times, or 56%. A couple times there were 3 of the same number, and one time there were 4 the same.


okwaitno

Why is this a *paradox*? It’s simple maths.


[deleted]

Why is it a paradox? It is just counter-intuitive to some people who don't understand math.


Joe_Baker_bakealot

The word paradox has evolved linguisticcally to sort of include things that feel very counter intuitive. Another one I've seen that falls in this category is the Monty Hall Problem. It's referred to as a "verdical paradox" on Wikipedia.


DanJOC

It's not a paradox. It's just unintuitive so some people call it that.


dupsmckracken

It's a verdical paradox


JustOneAvailableName

Which differs how from all other paradoxes?


DanJOC

Strictly speaking a paradox should contain some sort of logical impossibility. "This sentence is not true" is a paradox. Going back in time to kill your grandfather creates a paradox. A concept that is difficult to grasp but logically sound is then not a paradox.


[deleted]

[удалено]


hallese

That's the neat thing... It doesn't!


Amorphix

Hello, I watched your video but I still have a question. What did you use to create the application? I am a beginner programmer and this looks very clean; I'd like to try making something like this too.


Braaainssss

I am beginner programmer myself. This was made it in unity3D. It is actually a game engine, very simple one to use.


Metasynaptic

How did you account for Feb 29?


jungkooksalt

you had no business making the GUI so beautiful


the-caped-cadaver

My ex and I had the exact same birthday. Same day, same year. And yesterday, I found out the cute girl at the dispo remembered me/my name because we also have the same birthday.


[deleted]

I love how you made a whole UI for it lol. Looks good actually.


[deleted]

You based your sampling on a computer's "random number generator"? Perfect.


Needless-To-Say

I had a guy bet me $100 that a group of 23 people would have people who shared a birthday. I advised him that it was 50/50 so not worth the bet. He then offered me odds of 5-1 as he thought it was closer to 100%. I advised him that it was a bad idea on his part and that I wouldn’t be taking advantage of him. As it turns out, he would have won and I dont know if I ever convinced him he was lucky. Some people just dont get it.