* * * preliminary * * *

Binomial probability calculator

 Sample population (number of trials):  
 Number of successes:  
 Chance of success on each trial:  

Mode:       

Precision:       

       

Warning:  The Slow and Experimental settings can be very slow. Factors which might make them especially slow include:

● Large values of n.¹
● Calculating cumulative probablities rather than a simple binomial probability, especially for large values of k.²
● Long decimal or repeating decimal values of p (or their rational equivalents).³

The the slow / extreme setting is typically 100× to 5000× slower than the quick / normal setting, and it can be even worse. That can easily exceed the approximately three minute time limit of this server. If that happens, an error message should display (and usually does).

Enter the desired values, and then click: 


References: 

1. If you download binomcalc.pl and run it with no parameters, it displays a brief help message.

2. MathIsFun: The Binomial Distribution.

3. Dr. Harvey Berman's online binomial probability calculator.

4. Richard Lowrey's online binomial probability calculator.

5. VassarStats online binomial probability calculator.

6. iCalcu online binomial probability calculator.

7. WolframAlpha binomial probability calculator.

8. and many other on-line calculators (but I've not found any which handle the hard cases, with large numbers).

9. This tool is written in Perl 5, and uses the Perl BigRat module.

10. This tool uses GMP, the GNU Multiple Precision arithmetic library.


Download: 

To download this binomial probability calculator, as a standalone program, right-click here, and “save link as,” or “save target as,” or similar. It is written in Perl, so you'll need to have Perl installed to use it. On Windows I use Strawberry Perl, but most other recent version 5 Perls should also work.
(It is a work in progress, so there are no warranties, express nor implied, but you can contact me if you have difficulty.)


Footnotes: 

1 For example, if  perl binomcalc.pl m=cu a=s n=50000 k=10 p=1/10000  takes five seconds, then  perl binomcalc.pl m=cu a=s n=100000 k=10 p=1/10000  might take a 13 seconds.

2 Calculating cumulative probabilities for k=100 requires calculating binomial probabilities for 101 different values of k, and summing them.

3 This mainly affects the Experimental settings. For example, if  perl binomcalc.pl m=acu a=x n=35750 k=5 p=1/10000 b=1”  takes 1 second, then  perl binomcalc.pl m=acu a=x n=35750 k=5 p=1/9999 b=1  might take 40 seconds.

 

 

Last modified: 26-Apr-2021 (version 21)
By David A. Burton.
The “last modified” date & version number on this web page are maintained automatically by TLIB Version Control.
 

SeaLevel.info