Search for probability and statistics terms on Statlect
StatLect

Binomial distribution

by , PhD

The binomial distribution is a univariate discrete distribution used to model the number of favorable outcomes obtained in a repeated experiment.

Table of Contents

How the distribution is used

Consider an experiment having two possible outcomes: either success or failure.

Suppose that the experiment is repeated several times and the repetitions are independent of each other.

The distribution of the number of experiments in which the outcome turns out to be a success 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.

Chart of binomial distribution with interactive calculator

Number of trials
Probability of success
x (number of successes)
P(X = x)
P(X <= x)
P(X > x)

What you need to know

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.

Before proceeding, you are advised to study the lecture on the Bernoulli 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, we get[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, that is, 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.

You can also use the calculator at the top of this page.

Solved exercises

Below you can find some exercises with explained solutions.

Exercise 1

You independently flip a coin $4$ times and the outcome of each toss can be either head (with probability $frac{1}{2}$) or tails (also with probability $frac{1}{2}$).

What is the probability of obtaining exactly $2$ tails?

Solution

Denote by X the number of times the outcome is tails (out of the $4$ tosses). X has a binomial distribution with parameters $n=4$ and $frac{1}{2}$. The probability of obtaining exactly $2$ tails can be computed from the probability mass function of X as follows: [eq37]

Exercise 2

You independently throw a dart $10$ times.

Each time you throw a dart, the probability of hitting the target is $frac{3}{4}$.

What is the probability of hitting the target less than $5$ times (out of the $10$ total times you throw a dart)?

Solution

Denote by X the number of times you hit the target. X has a binomial distribution with parameters $n=10$ and $frac{3}{4}$. The probability of hitting the target less than $5$ times can be computed from the distribution function of X as follows:[eq38]and the value of [eq39] can be calculated with a computer algorithm, for example, with the calculator at the top of this page or with the MATLAB command[eq40]

How to cite

Please cite as:

Taboga, Marco (2021). "Binomial distribution", Lectures on probability theory and mathematical statistics. Kindle Direct Publishing. Online appendix. https://www.statlect.com/probability-distributions/binomial-distribution.

The books

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