The binomial distribution, denoted B(n,p), is the distribution

of the total number of successes in n independent trials

when p is the probability of success on each individual trial.

The mean of this distribution is np and the variance is np(1-p).

The above calculates the exact probability that a binomial

variable, B(n,p), is less than or equal to the x-value.

The probability mass function of the B(n,p) distribution is

f(x : n,p) = C_{n,x} p^{x}(1-p)^{n-x} for x =
0,1,...,n

where C_{n,x} = n!/(x!(n-x)!) is the number of combinations

of n things taken x at a time. For example, f(0 : 1,.5)=.5