Binomial Probability Distribution
05-25-2015, 10:38 PM (This post was last modified: 05-25-2015 10:40 PM by Dieter.)
Post: #4
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: Binomial Probability Distribution
(05-25-2015 10:11 PM)Dave Britten Wrote:  Thanks for the tip. I'll see if I can incorporate that. I've just always been doing the looped nCr approach.

I just tried it and it works well.
Let n and p be the distribution parameters, and k1 resp. k2 the lower/upper bound of the random variable. Then this is the basic idea:
• Calculate Comb(n, k1).
• Use this to calculate the probability B(k1,n,p).
This is the initial value of the sum you want to get.
• Repeat the following loop k2–k1 times:
• Calculate B(k+1) = B(k) * (n–k)/(k+1) * p/(1–p)
• Add this to the sum, increase k by 1.
You can even prestore the constant p/(1–p) so that it has to be calculated only once.

Dieter
 « Next Oldest | Next Newest »

 Messages In This Thread Binomial Probability Distribution - Dave Britten - 05-24-2015, 05:58 PM RE: Binomial Probability Distribution - Dieter - 05-25-2015, 09:51 PM RE: Binomial Probability Distribution - Dave Britten - 05-25-2015, 10:11 PM RE: Binomial Probability Distribution - Dieter - 05-25-2015 10:38 PM RE: Binomial Probability Distribution - Dave Britten - 05-25-2015, 10:51 PM RE: Binomial Probability Distribution - Dave Britten - 05-26-2015, 03:47 PM RE: Binomial Probability Distribution - Dieter - 05-27-2015, 12:51 PM RE: Binomial Probability Distribution - Dieter - 05-26-2015, 10:38 PM RE: Binomial Probability Distribution - Dave Britten - 05-28-2015, 01:44 AM RE: Binomial Probability Distribution - Dieter - 05-28-2015, 11:11 AM

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