An extract from an article by Keith Devlin
How many people you need to have at a party so that there is a better-than-even chance that two of them will share the same birthday?
Most people think the answer is 183, the smallest whole number larger than 365/2. In fact, you need just 23.
Surprisingly, the number of people you need to have present for there to be a better-than-evens chance of someone sharing your birthday is not 183, but the much larger 254. (Yes, really, 254, including yourself.)
Here are the answers ...
1. First, the coincidence of two birthdays. It turns out to be easier to compute the probability that no two people at the party have the same birthday, and then subtract the answer from 1 to obtain the probability that two people will share a birthday. For simplicity, let's ignore leap years. Thus, there are 365 possible birthdays to consider.
Imagine the people entering the room one-by-one. When the second person enters the room, there are 364 possible days for her to have a birthday that differs from the first person. So the probability that she will have a different birthday from the first person is 364/365. When the third person enters, there are 363 possibilities of him having a birthday different from both of the first two, so the probability that all three will have different birthdays is 364/365 x 363/365. When the fourth person enters, the probability of all four having different birthdays is 364/365 x 363/365 x 362/365. Continuing in this way, when 23 people are in the room, the probability of all of them having different birthdays is :
364/365 x 363/365 x 362/365 x . . . x 343/365.
This works out to be 0.492. (It is when you have 23 people that the above product first drops below 0.5.) Thus, the probability that at least two of the 23 have the same birthday is 1 - 0.492 = 0.508, better than even.
2. Now for the problem of the birthdays different from yours. Pick any person at the party. The probability of that person having a birthday different from you is 364/365. (Again, I'm ignoring leap years, for simplicity.) Thus, if there are n people at the party besides yourself, the probability that they all have a different birthday from you is (364/365)n. (Since we don't have to worry whether their birthdays coincide or not, we don't have to count down 364, 363, 362, etc. as we did last time.) The first value of n for which the number (364/365) n falls below 0.5 is n = 253.
And that's all there is to it.
Tuesday, May 22, 2007
The Law of Small Errors
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment