Blog News

1. Comments are still disabled though I am thinking of enabling them again.

2. There are now several extra pages - Poetry Index, Travel, Education, Childish Things - accessible at the top of the page. They index entires before October 2013.

3. I will, in the next few weeks, be adding new pages with other indexes.

Wednesday 17 June 2009

The Birthday Problem

One of those books mentions, in passing, one of my favourite bits of counter-intuitive maths. I first ran across it way back, when I was a nerdy schoolkid who liked to do maths. Just in case there is anyone who is unfamiliar with it, here it is again.
How many people need to be in a room in order for there to be a better than even money chance that two of them have the same birthday?
You can assume that all birthdays are equally likely and, just to make it a bit easier, you can forget about leap years.
.
.
.
So, think about it.
.
.
.
Of course if you've come across this before you had the answer sentences ago.
.
.
.
But, on the off chance that you haven't seen it, go on, think about it.
.
.
.
I'll just wait here.
.
.
.
(Um-de-dum-de-dum-de dum)
.
.
.
Still thinking?
.
.
.
Go on, I'm in no hurry.
.
.
.
OK. Let's have a look at the problem. Most people instinctively go for rather high numbers. 183 is a fairly common answer, presumably because that's over half of 365. It's completely wrong though. The correct answer, and I can prove it, is 23.
The way to tackle it is to work out the percentage chance that NONE of them have the same birthday and then take that away from 100.
So if there is one person in a room he has a birthday that (because we're ignoring leap years) must fall on one of 365 different dates. If someone else comes in then that person's birthday can be on any one of the others so it has 364/365 chance of not being the same. The next person has 363 chances in 365, the next one has 362 chances and so on.
The 23rd person has 343 in 365.
To get the chance of all of these events being true, we need to multiply them together.
(365/365) * (364/365) * (363/365) *... ... * (343/365)
and if you do that you get 0.048697 or as a percentage about 48.7%.
.
So if the percentage chance of there being no two birthdays the same is 48.7%, then the percentage chance that at least two are the same is 51.3%, or a bit more than evens. It turns out with a bit more maths that you only need there to be 57 people for there to be a better than 99% chance that two of them share a birthday and for a hundred people the chance of there being no two people who share a birthday falls to below one in a million.
I remember that being one of the first bits of counter-intuitive maths that I ever saw. I love maths almost as much as I love languages.

No comments: