Post Reply 
Binomial Probability Distribution
05-26-2015, 10:38 PM (This post was last modified: 05-26-2015 10:58 PM by Dieter.)
Post: #7
RE: Binomial Probability Distribution
(05-24-2015 05:58 PM)Dave Britten Wrote:  Running it with inputs 120, 1/6, 40, 120 yields 6.419629920E-6 in just over a minute. Compare to the version on my 48 using a direct summation of terms and repeated COMB calls returning 6.4196298769E-6. That's an error of 6.71E-7%, which isn't a terrible sacrifice for having the program finish inside of a lunar cycle (or possibly solar orbit) now.

The HP41 works with 10 digits, the HP48 with 12. For the former 1/6 equals 0,166 666 666 7, for the latter it's 0,166 666 666 667.

This means:
  • The correct result for p=1/6 is 6,4196298765918... E–6
  • The correct 10-digit result for p=0,1666666667 is 6,419629908 E–6.
    So the HP41 is pretty close.
  • The correct 12-digit result for p=0,166666666667 is 6,41962987691 E–6.
    So the HP48 is very close. Since COMB is an internal function and thus most probably exact in all 12 digits, this could be expected.
  • Compared to the true result with p exactly 1/6, both calculators offer similar accuracy: 8 out of 10 digits resp. 10 out of 12. ;-)
BTW my program returns the same result as yours. It has 70 steps including the COMB routine and the example runs in 53 seconds.

Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Binomial Probability Distribution - Dieter - 05-26-2015 10:38 PM

User(s) browsing this thread: 1 Guest(s)