Post Reply 
Binomial Probability Distribution
05-25-2015, 09:51 PM
Post: #2
RE: Binomial Probability Distribution
(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.

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-25-2015 09:51 PM



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