What Are The Odds That You Might Share A Birthday With A Colleague?

How many people do you have to put into a room before you are guaranteed that at least two of them share a birthday?

Office party picture from Shutterstock

We all know and love the blissful feeling of winning an argument. Well, trust me, that's an even better feeling if you're a mathematician.

It's not a matter of finding the right words -- rather it's the right ideas applied in a rigorous manner. And when this is done properly, the winner of the argument becomes known to everyone in the room.

The loser skulks back to his place of study, bloodied and bruised, to lick his or her wounds. What had seemed intuitively right is cancelled by a couple of lines of mathematics scrawled on the back of an envelope.

Maybe that's why mathematicians live in harmony, at least most of the time. We understand that belief and intuition can guide us towards a result, but these are not vessels capable of delivering final proof.

The Monty Hall Problem, which I wrote about recently, is a fine example of simple mathematics defying general intuition. And when I say defying, I really mean guiding: every time we are subject to such a striking idea our intuition actually aligns itself just that little bit more with reality.

In the spirit of sharing more paradigm-shifting mathematical delights with you all, we will consider another problem which will hopefully tug your belief system that little bit more.

A simple question

So, again:

How many people do you have to put into a room before you are guaranteed that at least two of them share a birthday?

The solution is fairly simple; there are 366 possible days (damn those leap years) that somebody can be born on. So if you had 367 people in a room, there's no way to assign each of them a birthday without having to use a date more than once.

The above idea is known to mathematicians as the pigeonhole principle: if you have to sort items into pigeonholes, and there are more items than pigeonholes, then at least one pigeonhole has to contain more than one item.

The same principle lends itself to proving statements such as "in Sydney there will be at least two people with the same number of hairs on their head".

A less simple question

Have a think about the following related problem:

How many people do you have to put into a room before you have a more than 50 per cent chance that at least two of them share a birthday?

Most people guess 184, as this is a bit more than half of 366.

But the correct answer is actually 23. If you throw 23 randomly selected people into a room then it's more likely than not that two of them share a birthday.

I've never seen anybody ballpark this number, or anything remotely close to it. It's a counterintuitive result. Of course, I'm hoping that I can convince you with the following argument (calculators out, please).

The dirty details

Let's make an assumption for simplicity, but this won't void the argument. Just consider a regular year of 365 days and assume that all 365 birthdays are equally likely.

Sure, it's known that in reality the birthdays of the population are subject to some variation but that's OK -- any sort of irregularities in reality would only increase the chances of a shared birthday.

So, we have a room of 23 people. We will actually calculate the probability that they all have different birthdays and show that this is less than 50 per cent.

We walk in to our room, grab a person -- Frank -- and put him to the side. We then choose another person, Betty. The probability that Betty has a different birthday to Frank is 364/365, as there are 364 days in the year that Frank was not born on.

We then grab another person -- Shazza -- and bring her over to the side. There is a 363/365 probability Shazza doesn't share a birthday with Frank and Betty, as there are 363 remaining days their birthday could fall on.

If we keep doing this, bringing a person over and calculating the probability that they don't share a birthday with the group before adding them to the group, we generate a bunch of probabilities:

364/365, 363/365, 362/365, … , 344/365, 343/365

The first probability arose from demanding that Frank and Betty do not share birthdays. The second probability has that Shazza doesn't share a birthday with Frank or Betty. The probabilities continue in this way.

If we wanted to know the overall probability -- that is, the probability that no two people share a birthday -- we need to multiply together all of the above probabilities. In doing so we get that there is a 49.27 per cent that none of them share a birthday, and this means that there is a 50.73 per cent chance that at least two of them share a birthday!

You can have a go at repeating the calculation for numbers other than 23. In particular, you can prove that 22 people isn't enough for a more than 50 per cent chance. Also, 57 people will give you a 99 per cent chance of a shared birthday!

Here's a graph that shows the probability of a shared birthday given different numbers of people in a room.

And if you happen to be celebrating your birthday today, many happy returns.

Adrian Dudek is a PhD Candidate at Australian National University. He does not work for, consult to, own shares in or receive funding from any company or organisation that would benefit from this article, and has no relevant affiliations.

The ConversationThis article was originally published at The Conversation. Read the original article.


Comments

    When I used to be at school, it's not awesome when someone else has the same birthday as you, because one of them gets more attention than the other, and it's rather depressing.

    Which is why I don't usually celebrate my birthday, some other guy had his birthday same as mine and everyone liked him more.

      Wow, you should probably get over that at some point.

      Hey @Sous - you're awesome. 'Can't share that - it's all you.

    Being a pedant, and being a mathematical article, I'm inclined to point out the problem with this article. The title asks "What are the odds that YOU share a birthday with a colleague?", which is not 50% if you have 22 or 23 colleagues. It is closer to 6%.

    I know it is nit-picky, but in mathematics, semantics matter a lot.

      Fair enough. Have added a 'might' to generalise the case a little.

        The might doesn't change anything Angus. The title of the article isn't addressed anywhere in the article itself. Read here for clarification. http://en.wikipedia.org/wiki/Birthday_problem#Same_birthday_as_you

        Last edited 12/08/13 1:07 pm

    "How many people do you have to put into a room before you are guaranteed that at least two of them share a birthday?"

    I'd argue the answer is anywhere from 2 to 367. Just find the right people. If you used the word "random", that would be different.

    Ok Angus, I give you free reign to tell me where to get off :)

    When I was posed with the 50% probability figure, I actually did ballpark 23 - I thought it was somewhere between 20 and 25. I guesstimated the number of unique pairs you would get: for 20 people that would be roughly 20x20 / 2 (200) and for 25 people 25x25/2 (around 300). My thinking was that if you get enough pairs, you'd get a matching one. Not very scientific, I know.

Join the discussion!