Post Reply 
Binomial Probability Distribution
05-25-2015, 10:11 PM
Post: #3
RE: Binomial Probability Distribution
(05-25-2015 09:51 PM)Dieter Wrote:  
(05-24-2015 05:58 PM)Dave Britten Wrote:  This program calculates the odds of a specified number of successes from independent trials with a known probability of success.

This requires a combinations function named COMB that calculates nCr. If you need one, see here.

Dave, it looks like your program evaluates COMB in every single loop so that it should not run particulary fast. But there is a simple fix: once nCr is known, the following nCr+1 can be evaluated very easily from this. Even the whole Binomial PDF for x+1 can be calculated from the PDF of the previous x, so that the slow power function in the loop can be avoided as well.


Thanks for the tip. I'll see if I can incorporate that. I've just always been doing the looped nCr approach.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Binomial Probability Distribution - Dave Britten - 05-25-2015 10:11 PM

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