The Birthday Problem / Paradox


Hello Today I’m going to be talking about the Birthday Problem, sometimes called the Birthday Paradox, and this is how it goes: so let’s suppose you have a room and unrelated people start entering the room and you ask them to start comparing their birthdays. You imagine that most of the time when two people compare there’s a very small chance of them matching birthdays. Most of the time they’re not going to match. But if you get a large enough number of people in the room you imagine there probably is a chance that eventually you’ll find two that match. So here’s the question. How many people do you need in a room before you have a 50:50 chance, a 50% chance, of two people sharing a birthday? So maybe you think it’s about 50? But then again 50 only represents less than one seventh of the possible number of birthdays so maybe you want a few more than that? What about 100? But even with 100 there’s still more than two thirds of the possible birthdays left. So maybe you want half the number of possible birthdays? There are 366 possible birthdays if you include February 29th so we want 183 people maybe? Or maybe you think even more than that? Maybe 300?! So I’ll give you a couple of seconds to think about how many you need in the room and then I’ll tell you what the answer is. OK so here is the answer. The number of people you need in a room before you’ve got a 50:50 chance of two of them having the same birthday is … 23! Yes, just 23. So it’s quite a counterintuitive result if you’ve never seen this before just how few people you need but before you say I’m just telling lies and it’s all wrong we’re going to prove it using probability. So when we’re doing this proof we’re going to make some assumptions. The first is that February 29th doesn’t exist. Now obviously it does exist but it makes the maths a little bit harder. So it doesn’t really change the result very much so we’re going to ignore it for the moment. Second we’re going to assume that each birthday is equally likely to come up. So we’re going to ignore slight increases in certain days and whatever else. And lastly we’re going to assume that each of the people in that room are independent from each other. So we’re not talking about a convention for twins or anything like that. The importance of the independence condition is that we can start multiplying [the probability of] events together. Right. So to prove this we usually phrase the opposite question. So instead of how many people before two people share the same birthday, what’s the probability that no-one shares a birthday? I.e. that every single birthday in that room is unique. So obviously when one person enters a room You can’t have a match because there aren’t enough people yet. When the second person enters the room to not match it must avoid the birthday of the first person who is already in the room. So there are 364 possible birthdays that will do that so the chance is 364 in 365. When the third person enters the room they must avoid two birthdays so now there’s only 363 days left so the chance of the third person avoiding both birthdays is 363 in 365 and then to get the probability that none of them share a birthday we multiply it by the result we had from the previous stage. When the fourth person enters the room it’s 362 in 365 times what we had before. When the fifth person enters the room we’re trying to avoid four birthdays now so it’s 361 in 365 times what we had before and each successive time we need to avoid one more birthday. By the time we have nine people in the room the probability that everyone avoids each other’s birthdays has dropped to about 90% This means that the opposite condition: the chance that at least one pair shares a birthday has nearly risen to 10%. By the time we have 15 people in the room together the probability that everyone avoids each other’s birthdays has dropped to less than 75%. This means there’s a greater than 25% chance, 1 in 4, that two of them will share a birthday with only 15 people in the room. And as the 23rd person enters the room the probability has now dropped to 49.27%. So that means the chance of two people having a birthday together is now above 50%. So yes this really means that you only need 23 people to be in a room together before there’s a 50% chance that two of them have the same birthday. So next time you’re in a room with a group of people why not try and find out if two of those people have the same birthday? In fact it works in all sorts of situations. So in fact by the time this video has had its 23rd view there’s a 50:50 chance that two of those viewers have the same birthday and actually it ramps up really quickly by the time this video has had 57 views there’s a 99% chance that two of them somewhere will have the same birthday. If it gets 100 views there’s a 1 in 3 million chance that no-one shares a birthday. So a really tiny chance! So thanks for watching!

About the author

Comments

  1. This…..video, on ….youtube was watched by me. And after watching….this video, I made a comment that said "This…..video, on ….youtube was watched by me. And after watching….this video, I made a comment that said" and a bunch of other stuff, but the point is that …this comment could have very well have been a slightly bit shorter than it really needed to be compared to the length it ended up being, as this comment is actually very long and it was just posted to this youtube video with the sole purpose to explain the simple fact that this seven and a half minute video could have ….very well been reduced to one.

  2. Very nice video, and very clearly explained. I would like to note that you said for the moment we will ignore February 29th. One would not expect it to have much effect overall, but how do we know that taking leap years into account does not change the result enough so that it takes, for example, 24 instead of 23 people to get to the 50% mark? Well never fear, I did the calculation and it does not affect the outcome.

    In particular, taking February 29th into account, the probability, p, that no two people have the same birthday in a group of n people, for 1<=n<=365, is
    p=[(365)…(365-n+1)/(365^n)][(1-L)^n][1+365n(L/(1-L))/(366-n)], where L=1/[(365.25)(4)].

    For 22 people, p=0.5247236, and the probability that at least two people have the same birthday is (1-p)=0.4752764, so 22 people is not enough to tip the 50% mark. But for 23 people, p=0.4931350 and the probability that at least two people have the same birthday is (1-p)=0.5068650. So in fact taking into account leap years does not affect the number of people needed to get to 50% probability of overlapping birthdays.

    Now for the special case of n=366 people. If we ignore February 29th, then we would conclude that the probability that no two people share the same birthday is zero. However, taking into account February 29th, we find that
    p=(366!)L[((1-L)/365)^365]=2.838860e-158.

    As you mentioned in the video there are real factors involving the nature of the population which might have some additional effect on the calculation. If one wanted to take things to an absurd extreme, another fact that could be considered is that years that are multiples of 100, but not of 400, are not leap years; for example, 1700, 1800, 1900 and 2100 are not leap years, but 1600 and 2000 are leap years. As long as no one in the room was born before 1901 or after 2099, we can ignore that fact!

  3. This is a tool that helped me visualize it better!: https://lukezirngibl.github.io/birthday-paradox/dist/

  4. What's counter intuitive about this is that you go into the question thinking what are the chances of someone at the party having the same birth date as YOUR birthdate, which is completely different than an undetermined birth date matching with someone else's birthdate.

  5. Ok any one having birthday on march ? If seven of them hit like then we have 50% chance of having same birthday ;P

  6. Hello. The paradox of birthday is very well known but  refers to at least two people.
    Then, what is the probability if at least 3 people or "N" people different from 2 have the same birthday? Thank you.

  7. If I randomly select 23 numbers between 1 and 365 is there a 50 percent chance of 2 numbers matching though ?

Leave a Reply

Your email address will not be published. Required fields are marked *