StatlectThe Digital Textbook
Index > Probability distributions

Binomial distribution

Consider an experiment having two possible outcomes: either success or failure. Suppose the experiment is repeated several times and the repetitions are independent of each other. The total number of experiments where the outcome turns out to be a success is a random variable whose distribution is called binomial distribution. The distribution has two parameters: the number n of repetitions of the experiment and the probability p of success of an individual experiment.

A binomial distribution can be seen as a sum of mutually independent Bernoulli random variables that take value 1 in case of success of the experiment and value 0 otherwise. This connection between the binomial and Bernoulli distributions will be illustrated in detail in the remainder of this lecture and will be used to prove several properties of the binomial distribution.

Definition

The binomial distribution is characterized as follows:

Definition Let X be a discrete random variable. Let $nin U{2115} $ and [eq1]. Let the support of X be:[eq2]We say that X has a binomial distribution with parameters n and p if its probability mass function is:[eq3]where [eq4] is a binomial coefficient.

The following is a proof that [eq5] is a legitimate probability mass function.

Proof

Non-negativity is obvious. We need to prove that the sum of [eq6] over its support equals 1. This is proved as follows:[eq7]where we have used the usual formula for binomial expansions: [eq8]

Relation to the Bernoulli distribution

The binomial distribution is intimately related to the Bernoulli distribution. The following propositions show how.

Proposition If a random variable X has a binomial distribution with parameters n and p, with $n=1$, then X has a Bernoulli distribution with parameter p.

Proof

The probability mass function of X is:[eq9]but:[eq10]and:[eq11]Therefore, the probability mass function can be written as:[eq12]which is the probability mass function of a Bernoulli random variable.

Proposition If a random variable X has a binomial distribution with parameters n and p, then X is a sum of n jointly independent Bernoulli random variables with parameter p.

Proof

We prove it by induction. So, we have to prove that it is true for $n=1$ and for a generic n, given that it is true for $n-1$. For $n=1$, it has been proved in the proposition above (the binomial distribution with parameter $n=1$ is a Bernoulli distribution). Now, suppose the claim is true for a generic $n-1$. We have to verify that $Y_{n}$ is a binomial random variable, where:[eq13]and X_1, X_2, $ldots $, X_n are independent Bernoulli random variables. Since the claim is true for $n-1$, this is tantamount to verifying that:[eq14]is a binomial random variable, where $Y_{n-1}$ has a binomial distribution with parameters $n-1$ and $p.$Using the convolution formula, we can compute the probability mass function of $Y_{n}$: [eq15]If [eq16], then:[eq17]where the last equality is the recursive formula for binomial coefficients. If $y_{n}=0$, then:[eq18]Finally, if $y_{n}=n$, then:[eq19]Therefore, for $y_{n}in R_{Y_{n}}$ we have:[eq20]and:[eq21]which is the probability mass function of a binomial random variable with parameters n and p. This completes the proof.

Expected value

The expected value of a binomial random variable X is:[eq22]

Proof

It can be derived as follows:[eq23]

Variance

The variance of a binomial random variable X is:[eq24]

Proof

Representing X as a sum of jointly independent Bernoulli random variables: [eq25]

Moment generating function

The moment generating function of a binomial random variable X is defined for any t in R:[eq26]

Proof

This is proved as follows:[eq27]Since the moment generating function of a Bernoulli random variable exists for any t in R, also the moment generating function of a binomial random variable exists for any t in R.

Characteristic function

The characteristic function of a binomial random variable X is:[eq28]

Proof

Again, we are going to use the fact that a binomial random variable with parameter n is a sum of n independent Bernoulli random variables:[eq29]

Distribution function

The distribution function of a binomial random variable X is:[eq30]where [eq31] is the floor of x, i.e. the largest integer not greater than x.

Proof

For $x<0$, [eq32], because X cannot be smaller than 0. For $x>n$, [eq33], because X is always smaller than or equal to n. For [eq34]:[eq35]

Values of [eq36] are usually computed by computer algorithms. For example, the MATLAB command:

binocdf(x,n,p)

returns the value of the distribution function at the point x when the parameters of the distribution are n and p.

Solved exercises

Below you can find some exercises with explained solutions:

  1. Exercise set 1 (compute quantities related to the binomial distribution)

The book

Most learning materials found on this website are now available in a traditional textbook format.