# binomial distribution

Consider an experiment with two possible outcomes (success and failure), which happen randomly. Let $p$ be the probability of success. If the experiment is repeated $n$ times, the probability of having exactly $x$ successes is

$$f(x)=\left(\genfrac{}{}{0pt}{}{n}{x}\right){p}^{x}{(1-p)}^{(n-x)}.$$ |

The distribution function^{} determined by the probability function^{} $f(x)$ is called a *Bernoulli distribution ^{}* or

*binomial distribution*.

Here are some plots for $f(x)$ with $n=20$ and $p=0.3$, $p=0.5$.

The corresponding distribution function is

$$F(x)=\sum _{k\le x}\left(\genfrac{}{}{0pt}{}{n}{k}\right){p}^{k}{q}^{n-k}$$ |

where $q=1-p$. Notice that if we calculate $F(n)$ we get the binomial expansion for ${(p+q)}^{n}$, and this is the reason for the distribution^{} being called binomial.

We will use the moment generating function to calculate the mean and variance^{} for the distribution. The mentioned function^{} is

$$G(t)=\sum _{x=0}^{n}{e}^{tx}\left(\genfrac{}{}{0pt}{}{n}{x}\right){p}^{x}{q}^{n-x}$$ |

which simplifies to

$$G(t)={(p{e}^{t}+q)}^{n}.$$ |

Differentiating gives us

$${G}^{\prime}(t)=n{(p{e}^{t}+q)}^{n-1}p{e}^{t}$$ |

and therefore the mean is

$$\mu =E[X]={G}^{\prime}(0)=np.$$ |

Now for the variance we need the second derivative

$${G}^{\prime \prime}(t)=n(n-1){(p{e}^{t}+q)}^{n-2}+n{(p{e}^{t}+q)}^{n-1}p{e}^{t}$$ |

so we get

$$E[{X}^{2}]={G}^{\prime \prime}(0)=n(n-1){p}^{2}+np$$ |

and finally the variance (recall $q=1-p$):

$${\sigma}^{2}=E[{X}^{2}]-E{[X]}^{2}=npq.$$ |

For large values of $n$, the binomial coefficients^{} are hard to compute, however in this cases we can use either the Poisson distribution^{} or the normal distribution^{} to approximate the probabilities.

Title | binomial distribution |

Canonical name | BinomialDistribution |

Date of creation | 2013-03-22 13:03:01 |

Last modified on | 2013-03-22 13:03:01 |

Owner | Mathprof (13753) |

Last modified by | Mathprof (13753) |

Numerical id | 17 |

Author | Mathprof (13753) |

Entry type | Definition |

Classification | msc 60E05 |

Synonym | Bernoulli distribution |

Synonym | binomial random variable^{} |

Synonym | binomial probability function |

Synonym | Bernoulli random variable |

Related topic | BinomialCoefficient |

Related topic | BinomialTheorem |

Related topic | BernoulliRandomVariable |