Post Reply 
Binomial Probability Distribution
05-28-2015, 11:11 AM
Post: #10
RE: Binomial Probability Distribution
(05-28-2015 01:44 AM)Dave Britten Wrote:  Good idea with the early exit. I'll have to play around with that a bit.

Here is an update with the Comb loop counting up the denominator:

Code:
.. ...
21 x>y?     // min(n, n-k1) = 0 ?
22 GTO 03   // then Comb=1, skip Comb loop
23 RCL 01
24 LBL 01
25 *        // calculate Comb(n, k1) iteratively
26 DSE L
27 RCL 01
28 LastX
29 -
30 ST/ Y
31 X<> L
32 DSE Z
33 GTO 01
34 RDN
35 LBL 03
.. ...

That's three more steps, on the other hand the RCL 01 command in line 14 now can be omitted. So all in all it's two steps more. But accuracy improves – try your example once again:

Code:
120 [ENTER] 6 [1/x] 40 [ENTER] 120
XEQ"BINCDF"   =>   6,419629908 E–6

That's the exact result for a ten-digit value of 1/6. :-)

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


Messages In This Thread
RE: Binomial Probability Distribution - Dieter - 05-28-2015 11:11 AM



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