The Chances of Sharing a Birthday

In any given group of people, how many people do you think there need to be in order for there to be a 50% chance of at least two people sharing the same birthday?

365 / 2 = ~183 people?

Nope. Think again. This is not a trick question, just plain old mathematical probability.

The answer, which I found very counter-intuitive at first, is 23. It’s called the Birthday Paradox. The mistake I was making (and that most people would probably make) is that I was picking a single birthday and thinking of the probability of any given birthday matching it rather than moving on and testing for every other birthday possibility in the group.

I still struggle with it however, when I think back to school days where there should have been a 100% chance of two kids sharing a birthday in any two classes. I can’t remember anyone sharing a birthday at all.

(Or have I done the math wrong here by assuming that two classes of 23 students will give a 100% chance? Perhaps this equates to 75% instead or remains at 50%? Gaaah! I knew I should have listened in school!).

Jack, if you are reading this perhaps you could test this to see if it really works in a class situation?

Tags: , ,

11 Responses to “The Chances of Sharing a Birthday”

  1. Ken Says:

    It’s not quite the same birthday but I wonder what the chances are of this sequence.
    My first wife and I had birthdays 2 days apart (we were actually born in the same maternity hospital)
    My current partner’s birthday is one day after mine (although 5 days younger).
    A brother’s birthday is two days after mine. We once celebrated birthdays on 3 consecutive days).
    These dates are at the end of August - possibly increases probability.

    Mind you, there are some that give astrological explanations for this!

  2. Ian Says:

    I love this sort of thing. Here is how you work out the probabilities:

    Firstly it is slightly easier to calculate the probability two birthdays DON’T match. Then if there is a 10% probability they don’t match, we of course know there is a 90% probability they do.

    Say we have a group of 23 people (all males to avoid his/her lol).

    The first person obviously can’t share a birthday with himself.
    The second person has a 365/366 chance of NOT sharing a birthday with person 1(or 99%).
    The third person has a 364/366 chance of NOT sharing a birthday with either of the previous 2.
    …and so on until…
    The twenty third person has a 344/366 chance of not sharing a birthday with any of the previous 22 people (i.e. about 94%, still quite high).

    However those are all individual probabilities and independent of each other. In order to see the combined probability of all of these being true we have to multiply them together (i.e. 365/366*364/366*…*344/366) which gives a probability of 49.4% that none of the 23 match. Or in other words a probability of 50.4% that at least one DOES match! Even more interesting is that you only have to double the number of people (to 46) to get a 94.8% chance that at least one birthday will match despite only covering less than 13% (46/365) of possible birthdays!

    The probability will never be 100% that there is a match until you get to 367 people because there is still a tiny chance (~5^-149 % !!) that you could have 366 people with all different birthdays.

    I highly recommend a book called “Coincidences, Chaos and all that Math Jazz” (Burger & Starbird, 2005) which is a great non-math-geek take on this sort of thing. Richard Dawkins also covers this in my favourite book Unweaving the Rainbow.

    Enjoy :)
    Ian

  3. Damian Says:

    Hehe, Christmas time sounds like it’s more than just a time of celebration in your family eh?

    [sorry, this comment was directed at Ken's comment and got pushed down one with Ian's de-spammed comment]

  4. Ian Says:

    I made a big post yesterday about this but it didn’t show, and when I tried to repost it said I’d already made that post so I wonder if the spam filter ate it? :)

  5. Damian Says:

    Sorry! Yes it got spamified. No idea why though.

    Thanks for the explanation - I can vaguely grasp what you are doing there with the whole NOT thing. What about my assumption that two classes of 23 students will be guaranteed to have people sharing the same birthday? I’m pretty sure I’ve got it wrong there. What is the actual chance of a match with two groups of 23?

  6. Ian Says:

    Oops! I missed the 2 classes thing first read through lol. With 2 classes of 23, it is easy to see a possible combination where there wouldn’t be a match - just pick 46 different birthdays - so the probability of a match can’t be 100% because the chance of NO match is not zero.

    Now the odds of each person in Class A having a birthday that isn’t in Class B would be 343/366 (because 343 of the 366 possible birthdays wouldn’t match). The odds of this happening 23 times (once per student) are 343/366^23 (i.e. the 23 odds multiplied together). This gives a chance of 22.5% that there isn’t a match, or a 77.5% chance there is a match. Since we know that if none in A match B then the reverse is also true, we can say the chance of a match between two classes of 23 people is 77.5%. (I am pretty sure that’s right and it matches with an empirical test I just tried in Excel lol).

    This assumes all birthdays in the 23 are different which we know is only a 50-50 chance. The odds would be slightly less for the 50% of times there is a match but the difference is marginal. Also it is worth noting that The probability of a match between any 46 people is quite different to the probability of one or more matches between two groups of 23 - it is 94.8% which is obviously much higher than 77.5%.

    Similar to last time, the only way you could get a probability of exactly 100% would be to have 2 classes of 184 or more in each (so that there are more than 366 people and the chance of no repeat is zero) although by my calculations you hit 99% with two classes of 40 people.

    Enjoy!
    Ian

  7. Damian Says:

    Gah! Your comment got automatically spam-binned again. I use Askimet and all I can do is mark comments as spam or not spam. No whitelist options that I can find. I’ll try to keep an eye on it but if you (or anyone else) needs to contact me by email it’s the same as the website address but with an @ instead of the first dot.

    —-

    I think in the classroom analogy you use here you are allowing for birthdays to match between classrooms? If I were to throw a die I would have a 1/6 chance of throwing a 6. If we were to both throw dice we would (between us) have a 2/6 chance of throwing a 6? So how come if you have one classroom of 23 students there is a 1/2 chance but with two classrooms being ‘thrown’ at the same time there is not a 2/2 chance?

    As you can see statistics is not my thang. Am I doing something wrong by treating each classroom as a separate entity like a die with a probability of 1/2?

  8. Ian Says:

    No idea why the spaminator doesn’t like me - it might be the length of the posts? Or maybe the numbers…

    Let us consider the dice possibility. If each of us rolls one dice each then there are 36 possible results (1&1,1&2,2&1,…,5&6,6&6). So the possibility of any particular result is determined by how many ways it could occur out of the 36 possible ways. So if we were to ask the probability that you roll a 3 and I roll a 2, the probability is 1/36 (there is only one possible way to do it out of 36 possible rolls). However if you were to ask the probability of our numbers adding up to 7, there are actually 6 ways it could happen (1&6, 2&5, 3&4, 4&3, 5&2, 6&1) so the probability is 6/36.

    Now the probability of one of us rolling a 6 is 1/6 but this doesn’t mean that the probability at least one of us rolling a 6 is double that. In fact the probability of at least one of us rolling a 6 is really 11/36. Why? Because there are only 11 possible rolls that we could make that would give a 6. This might seem counterintuitive until you realise that if we both roll a 6, one of those 6s is effectively “wasted” so the odds of at least one of us rolling a 6 is greater than the odds of either one of us rolling a 6 on our own, but it is slightly less than double thanks to the “wasted” 6 in the 6&6 roll.

    Extrapolating this to the birthday example we see the same thing. The more people we get, the higher chance there is that there will be a hit, but also the higher the chance is that there will be “wasted” hits (such as 2 birthdays that match, or 3, or 4, etc) so the probability of a hit increases but at a decreasing rate (relative to the number of people) thanks to the growing number of wasted hits.

    Hope that helps!

    Cheers
    Ian

  9. servant Says:

    Damian - I know this isn’t the place to discuss this, but thought people like yourself and Ken may be interested in this:
    http://fritchie.wordpress.com/2008/05/29/i-am-a-christian-who-believes-in-theistic-evolution/

  10. Damian Says:

    Ian, by chance (no pun intended) a podcast I regularly listen to has just covered the topic of probability from a historical perspective. You might be interested in it.

    In Our Time with Melvyn Bragg - Podcast on Probability.

  11. Jack Says:

    Cool post Damian — I thought of using it in a lesson but I mainly have quite low ability classes and fear I’d destroy their last hope of understanding maths, I’d try it with an able class except I’d probably (not sure on the odds ; ) get myself lost mid lesson. I’ll have to check my class birth date records tomorrow and see whether the experimental and theoretical probability match up. Ken, my birthday is late August too. My siblings and I all have birthdays in the last few days of the month which I later realised may well be related to our mum’s menstrual cycle. Humans eh, how we detest randomness, always trying to find a pattern and an explanation.

Leave a Reply