(25) Binomial Probability Distribution
|
11-17-2019, 09:14 PM
(This post was last modified: 11-17-2019 09:15 PM by Dave Britten.)
Post: #1
|
|||
|
|||
(25) Binomial Probability Distribution
This program calculates the cumulative binomial probability distribution between a given lower and upper value for r.
B(n, r, P) = Binomial probability mass of r successes in n independent trials, each with a chance of success P. The program is built around these two formulas: ln(B(n, 0, P)) = n * ln(1-P) ln(B(n, r+1, P)) = ln(B(n, r, P)) + ln(n-r) - ln(r+1) + ln(P) - ln(1-P) Logarithms are used to avoid over/underflows in intermediate calculations. Usage: Enter the program, and store your four inputs, n, P, MIN, and MAX, into the designated registers. R1 = n R2 = P R3 = MIN (i.e. lower value of r) R4 = MAX (i.e. upper value of r) Press f PRGM, R/S, and wait for the cumulative probability to be returned. A lower tail can be obtained by setting R3/MIN to 0, and an upper tail by setting R4/MAX equal to n. Set R3=R4 to compute probability mass for a single number of successes. Program code: Code: 01 0 Example: 100 trials, P = 40%, what is the probability that 0-50 trials succeed? 100 STO 1 .4 STO 2 0 STO 3 50 STO 4 f PRGM R/S ...wait approx. 2 minutes... 0.9832 (fix 4), or 98.32% |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(25) Binomial Probability Distribution - Dave Britten - 11-17-2019 09:14 PM
RE: (25) Binomial Probability Distribution - Gene - 11-17-2019, 09:48 PM
RE: (25) Binomial Probability Distribution - Dave Britten - 11-17-2019, 09:57 PM
RE: (25) Binomial Probability Distribution - PedroLeiva - 11-18-2019, 01:21 AM
RE: (25) Binomial Probability Distribution - Gene - 11-18-2019, 12:09 PM
RE: (25) Binomial Probability Distribution - Albert Chan - 11-18-2019, 11:29 PM
|
User(s) browsing this thread: 2 Guest(s)