Main      Site Guide    
Message Forum
Re: Happy Birthday, Howard!
Posted By: Don the Monkeyman, on host 24.70.0.3
Date: Monday, August 27, 2001, at 07:46:46
In Reply To: Re: Happy Birthday, Howard! posted by Wes on Sunday, August 26, 2001, at 15:58:49:

> > > With the birthdays evenly distributed, I'd say you'd need about 1678 people.
> >
> > Now, as I said, I don't know the answer myself, and I'm not very good at probability math, so I'd be interested in knowing how you arrived at this number ... (That's half the reason why I posted that question ... :-) )
> >
> > Trav"puzzles over his own problem"holt.
>
> Actually, I cheated. And my answer is just an educated guess. I wrote a little perl script to experiment with different numbers. It's at http://www.theherezone.com/chaos/chaos2.cgi if you want to try it. The first box is the number of options, and the second box is the number of data points you want. The number that's printed out is the percent of the options that have at least one data point thingy in them. I just made the numbers really big, big enough that every time I refreshed and got new random data the answer was still very close to what it was the time before, and then I tested some more to check if I could simplify it down to only 365 choices and have it still work, and then I did.
>
> Wes - "Yeah, well, cheaters sometimes prosper."

After watching this for a little while, I decided to figure out the precise answer and then give you all a probability lesson.

The trick that gets most people with this one is the fact that it needs to be solved with inverse probabilities. We can't calculate directly the odds of a given group of people having one member with a given birthday; however, we CAN calculate the odds that the given group of people will have NO people with a given birthday (since the condition holds for the entire group) and then the inverse of that is the probabilitiy that at least one of the will have a given birthday. In essence, we do this whole problem in reverse.

Start by assuming that there are 365.25 days in a year (which is close enough for our purposes). The chance that a given person will have a birthday on a specific day is (1/365.25). Hence, the chance that their birthday is not on that day is (364.25/365.25). The chance that a group of people will not contain anyone with a birthday on a given day is ((364.25/365.25)^x) where x is the number of people. We want to find the point where it is 99% likely that someone DOES have a birthday on that day, so the odds that none of them do are 1% (or 0.01). Thus, we want (((364.25/365.25)^x) = 0.01). Solve for x. To solve for x, we take the logarithm, getting (x*log(364.25/365.25) = log(0.01) = -2) so (x = (-2/(log(364.25/365.25)))) and x is then 1679.7, so roughly 1680 people, which is very close to Wes's guess-and-test solution of 1678. I assume that the 1678 was calculated using 365 days instead of 365.25; the rigorous solution here yields 1678.6.

I hope that wasn't too confusing. I love probability, but I'm not too sure how good I am at explaining it. :-)

Don "Always good to start the day with a little math" Monkey

Replies To This Message