Fog Creek Software
Discussion Board

How many people?

There are x people in a room, what is the smallest x such that there will be at least a 50 percent chance that two of these people will have the same birthday?

Tuesday, December 2, 2003



p23=0.493 (p22 is just slightly over .5)

So the answer is you need at least 23 people

-Dan (toasty)

Wednesday, December 3, 2003

Just like to point out that 365 or 366 days in a year makes no difference in this problem if we assume that people are equally likely to be born on any day of the year.  In reality, more people are born 9 months after New Years Eve or other holidays.

I am interested in knowing how to obtain the number 23 using the formula Pn without having to compute P1, P2, P3, ... P22, all the way to P23 to see that P22 is over .5 and P23 is under .5.  Okay, maybe I do not have to compute all 23 of them; I can skip some like every 2 or every 5.  However, I am interested in the direct approach, not trial and error.

Wednesday, December 3, 2003

I think that if there was a direct approach, it would be very complicated and unwieldy to use. In this problem my first guess was 15; intuitively, you can rule out the chances that fewer than this number would be the right answer--especially very low numbers like 4 or 5. It would be esthetically pleasing, I must admit, to have a formula that takes you right to the answer without the need to make any guesses.

Wednesday, December 3, 2003

*  Recent Topics

*  Fog Creek Home