computing chances - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: computing chances (/thread-91015.html) |
computing chances - Bram - 04-14-2006 (just a real life story, slightly to do with calculators; you may like it)
Re: computing chances - Eric Smith - 04-14-2006 This is known as the "birthday problem" or "birthday paradox", though in my opinion there's no paradox involved.
The probability that two people out of n share the same date is 1 minus the probability that they each have a unique date. Here is an untested program for the HP-41, run with n in X:
LBL BPThe program starts with a probability of 1, uses an index variable i (on the stack) which counts down from n to 1, and at each step multiplies by (366-i)/365. This results in the probability of no match; the result is then subtracted from 1 to get the probability of a match. A similar program (also untested) should work on most other RPN calculators by storing the iteration variable in a numbered register rather than on the stack:
LBL B Re: computing chances - Gerson W. Barbosa - 04-14-2006
Quote: Shouldn't this be 365Pn/365^n?
1 - 365Pn/365^n = 0.598240820 or 59.8% (for n=26), in accordance with your (tested) HP-41 program.
Re: computing chances - Bram - 04-16-2006 Thanks Eric, for your contribution. *LBL CHANCE26 XEQ CHANCE => 0.40(17591805) The answer 0.40 is the answer for the reversed question. So the answer to the original question is 1-0.40 => 0.60. So take 26 people at random, for example 26 readers of the HP museum forum and there's 60% chance that at least 2 of them were born on the same day in the year. And that's an unexpectedly high value, isn't it? With an increasing number of people the chance for 'all different dates' will approach zero and hence the chance for 'a duplicate' will approach certainty. With 366 or more people a duplicate will have become certain. Strangely enough, when I would ask (the other way round) for the chance for the existence of a date on which nobody has his/her birthday then this chance will never be equal to zero, no matter how many people I put together. Hard to believe that even for the entire Dutch population (about 16 million persons) there's a chance, albeit extremely low, that on one (or more!) date(s) nobody celebrates his/her birthday. It will never happen, but there is a chance ...
Re: computing chances - Eric Smith - 04-16-2006 Quote:
Yes, the "C" was a misteak.
|