Binomial Distribution

The binomial distribution is the distribution of the number of successes in a sequence of n experiments, each of which yields success with the p probability. The important limiting binomial distributions are the Poisson distribution and normal distribution.

The function of probability density is given by the formula:

Where:

If random values in the function are modeled based on the fact that if Y1, …, Ym   are two independent random variables following the Bernoulli distribution with the success probability p, the value has the binomial distribution with m degrees of freedom. The following steps are executed to generate pseudo-random value X ~ Bin(m, p):

1. Generate sample for m independent random values Y1, …, Ym , distributed by the Bernoulli law with probability of success in each trial equal to p. To model a random value Y with the Bernoulli distribution, generate a sample U = {u1, …, un} based on continuous uniform distribution at the interval (0, 1), following which the values are assigned to the variables Y = {y1, …, yn} in accordance with the following rule:

yi = 0, if 0 ≤ ui ≤ 1

yi = 1, if p < ui ≤ 1

2. Values of elements of the X sample of a specified binomial distribution are obtained in accordance with the following rule:

X = Y1 + Y2 + … + Ym

or xi = y1,i + y2,i + … + ym,i

See also:

ISmBinomialDistribution | IStatistics.BinomDist | Library of Methods and Models