Re: Birthday Problem
From: tom_usenet (tom_usenet_at_hotmail.com)
Date: 04/13/04
- Next message: Ioannis Vranos: "Re: Birthday Problem"
- Previous message: tom_usenet: "Re: Destructor for const object"
- In reply to: Sandra: "Birthday Problem"
- Next in thread: Dave Moore: "Re: Birthday Problem"
- Reply: Dave Moore: "Re: Birthday Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 13 Apr 2004 13:31:49 +0100
On Mon, 12 Apr 2004 15:41:39 GMT, s.cantrell@mindspring.com (Sandra)
wrote:
>I was given this problem for extra credit and I am just stuck !
>BTW - I am not asking for source code and I am not asking anyone to do
>my homework as I do want to learn .. I just need a hint or two to get
>moving and I need to know if what I have written so far is leading me
>in the right direction ~
>
>Ok - The problem is to find out how many people need to be in a room
>for a 95% chance that someone in that room will match my birthday
This question is impossible to answer without statistics on how many
people in the population were born on each day of the year. It is very
unlikely to be a uniform distribution, which is what everyone else
seems to be assuming (e.g. if everyone in the world was born on 4th
July, the answer would be 1).
Even if you assume that anyone was born on a particular day of the
year with equal probability, you still run into the problem of leap
years. To calculate how this affects things will require a full world
population age distribution, to find out the average number of leap
years per year over the population as a whole. However, assuming
365.25 days per year is probably safe since you only need a result to
the nearest person.
Anyway, before answering the question, make sure you state your
assumptions clearly.
Tom
-- C++ FAQ: http://www.parashift.com/c++-faq-lite/ C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
- Next message: Ioannis Vranos: "Re: Birthday Problem"
- Previous message: tom_usenet: "Re: Destructor for const object"
- In reply to: Sandra: "Birthday Problem"
- Next in thread: Dave Moore: "Re: Birthday Problem"
- Reply: Dave Moore: "Re: Birthday Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|