Random Number Generator - Binomial Distribution



 

     
 

The Binomial distribution describes the number of successes in t independent Bernoulli (yes or no) trails with probability p of success on each trial.  It is used to answer questions such as how many times a head will come up when a coin is flipped 5 times or how many defective items will be found in 20 items.

The following example shows input and output from 3 simulations.  Each simulation has the probability (of success) and number of trial set as (0.4, 10), (0.5, 50), and (0.8, 100), respectively.   All three simulations have 50,000 iterations and alpha of 5% (for 1 tail test).




The output shows the estimate of skewness, mean, stand deviation, maximum value, minimum value, lower confidence interval, and upper confidence interval from each of the 3 simulations.  The simulated means (3.99, 25, and  80) closely represent the theoretical means (p * t) from each of the simulations.

The following shows the charts generated from the 3 simulations.

Complete program (with open source codes) available in Package Set 2 and the Combo Package.









 <>