# Examples of the Binomial Distribution

The binomial distribution is one of the easier distributions to handle in terms of structure and calculation. Here’s what you need to know in order to choose a binomial approach in an experiment:

Rule

### CriteriaforUseoftheBinomialDistribution

A random variable $X$ is represented by the binomial distribution if all of these points are fulfilled:

1.
There are $n$ trials.
2.
Each trial has only two outcomes, success and failure.
3.
In each trial, the probability of success is $p$.
4.
The trials are independent of each other.
5.
$X$ is the total number of successes across the trials.

Rule

### BinomialDistribution

The probability of getting exactly $k$ successes out of $n$ trials is

 $P\phantom{\rule{-0.17em}{0ex}}\left(X=k\right)=\left(\genfrac{}{}{0.0pt}{}{n}{k}\right){p}^{k}{\left(1-p\right)}^{n-k},$

where $n$ is the total number of trials, $k$ is the number of successes you want and $p$ is the probability of success in each trial.

Example 1

You roll four dice and look for the number of sixes. The random variable is then

When you roll a die, you either get a $6$, or you don’t. Call each $6$ a success. The experiment then follows the binomial distribution with

Now you can calculate the probability of getting either $k=0$, $k=1$, $k=2$, $k=3$ or $k=4$ sixes.

You do that by using the formula above. Then you can put the numbers you get into a table:

 $k$ 0 1 2 3 4 $P\phantom{\rule{-0.17em}{0ex}}\left(X=k\right)$ $0.48$ $0.39$ $0.12$ $0.02$ $0.0008$

This is the probability distribution of $X$.

Note! The sum of the probabilities in a probability distribution is always $1$.

Example 2

The company running the bus routes raises the number of ticket inspections. They assume that 1 out of 5 passengers travel without a ticket. If they inspect the tickets of 20 random passengers, what’s the probability that

1.
One of the 20 doesn’t have a ticket?
2.
Five of the 20 don’t have a ticket?
3.
At least three of the 20 don’t have a ticket?

1 in 5 ride without tickets, and what you’re examining is how many ride with no ticket. That means that

 $p=\frac{1}{5}=0.2.$

That makes this a binomial distribution with $n=20$ and $p=0.2$.

1.
First you want to find the probability that exactly one of the 20 doesn’t have a ticket. In that case $k=1$, and the formula becomes $\begin{array}{llll}\hfill P\phantom{\rule{-0.17em}{0ex}}\left(X=1\right)& =\left(\genfrac{}{}{0.0pt}{}{20}{1}\right){p}^{1}{\left(1-p\right)}^{20-1}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =20\cdot 0.2\cdot 0.{8}^{19}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \approx 0.06.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

The probability that exactly one of the $20$ doesn’t have a ticket is around $6$ %.

2.
Next, we want to find the probability that exactly five of the 20 don’t have a ticket. In that case $k=5$, which makes the formula $\begin{array}{llll}\hfill P\phantom{\rule{-0.17em}{0ex}}\left(X=5\right)& =\left(\genfrac{}{}{0.0pt}{}{20}{5}\right){p}^{5}{\left(1-p\right)}^{20-5}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =15\phantom{\rule{0.17em}{0ex}}504\cdot 0.{2}^{5}\cdot 0.{8}^{15}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \approx 0.17.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

The probability that exactly five of the 20 ride without a ticket is around $17$ %.

3.
Finally, you want to find the probability that at least three of the 20 don’t have a ticket. That means that either 3, 4, 5 and so on up to 20 don’t have a ticket. As this is a lot of outcomes to find the probability of, it can be smart to look at the complement instead. Our inquiry is the same as saying that “0, 1 or 2 out of 20 don’t have a ticket” doesn’t occur after all. This gives you

To calculate , you have to add up $P\phantom{\rule{-0.17em}{0ex}}\left(X=0\right),P\phantom{\rule{-0.17em}{0ex}}\left(X=1\right)$ and $P\phantom{\rule{-0.17em}{0ex}}\left(X=1\right)$, making the first order of business to find them using the same formula you used in Items 2 and 3.

• 

P (X = 0) = (20 0 ) 0.20 (1 0.2)200 = 0.820 0.01
P (X = 0) = (20 0 ) 0.20(1 0.2)200 = 0.820 0.01
• You already calculated $P\phantom{\rule{-0.17em}{0ex}}\left(X=1\right)$ in Item 2, making $P\phantom{\rule{-0.17em}{0ex}}\left(X=1\right)=0.06$.

• 

P (X = 2) = (20 2 ) 0.22 (1 0.2)202 0.14
P (X = 2) = (20 2 ) 0.22(1 0.2)202 0.14

Now you can see that

Then you can finally calculate

making the probability that at least three out of the 20 don’t have ticket around $79$ %.

Example 3

Stephen King participates in a quiz with 50 questions where every question has four alternatives. Unfortunately, Stephen has forgotten to prepare at all, forcing him to guess on every question.

1.
If he gets every question correct, he wins a trip to Paris. What’s the probability of Stephen King guessing the right answer to all 50 questions?
2.
If he gets exactly 30 answers right, he wins a trip to Hawaii. What’s the probability of him winning this trip?
3.
Everyone who manages to get at least five answers right, wins free entry to the Museum of Natural History. What’s the probability of Stephen King winning this prize?

The probability of guessing the correct answer to a question with four alternatives is $\frac{1}{4}=0.25=25\phantom{\rule{0.17em}{0ex}}\text{%}$.

1.
As the quiz has 50 questions, $n=50$. Stephen needs all of them to be correct to achieve $k=50$. This gives you that
 $P\phantom{\rule{-0.17em}{0ex}}\left(X=k\right)=\left(\genfrac{}{}{0.0pt}{}{n}{k}\right){p}^{k}{\left(1-p\right)}^{n-k}$

becomes $\begin{array}{llll}\hfill \phantom{\rule{-22.31694pt}{0ex}}P\phantom{\rule{-0.17em}{0ex}}\left(X=50\right)& =\left(\genfrac{}{}{0.0pt}{}{50}{50}\right)\cdot 0.2{5}^{50}\cdot {\left(1-0.25\right)}^{50-50}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =1\cdot 0.2{5}^{50}\cdot 0.7{5}^{0}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \approx 7.89\cdot 1{0}^{-31}.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

Sadly, Stephen is probably never going to Paris.

2.
As the quiz has 50 questions, $n=50$. To achieve 30 correct answers, Stephen needs $k=30$:
$\begin{array}{llll}\hfill P\phantom{\rule{-0.17em}{0ex}}\left(X=30\right)& =\left(\genfrac{}{}{0.0pt}{}{50}{30}\right)\cdot 0.2{5}^{30}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \phantom{\rule{2em}{0ex}}\cdot {\left(1-0.25\right)}^{20}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \approx 1.30\cdot 1{0}^{-7},\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llll}\hfill P\phantom{\rule{-0.17em}{0ex}}\left(X=30\right)& =\left(\genfrac{}{}{0.0pt}{}{50}{30}\right)\cdot 0.2{5}^{30}\cdot {\left(1-0.25\right)}^{20}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \approx 1.30\cdot 1{0}^{-7},\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

which means that he’s not likely going to Hawaii either.
3.
To get at least five correct answers means getting between 5 and 50 correct answers. You have to find the probability of $X\ge 5$. This is the same as the probability that $X$ isn’t 0, 1, 2, 3 or 4. That means you can use the rule for complementary events $P\phantom{\rule{-0.17em}{0ex}}\left(A\right)=1-P\phantom{\rule{-0.17em}{0ex}}\left(\overline{A}\right)$ to calculate
$\begin{array}{llll}\hfill P\phantom{\rule{-0.17em}{0ex}}\left(X\ge 5\right)& =1-\left(P\phantom{\rule{-0.17em}{0ex}}\left(X=0\right)+P\phantom{\rule{-0.17em}{0ex}}\left(X=1\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}+P\phantom{\rule{-0.17em}{0ex}}\left(X=2\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}+P\phantom{\rule{-0.17em}{0ex}}\left(X=3\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}+P\phantom{\rule{-0.17em}{0ex}}\left(X=4\right)\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llll}\hfill P\left(X\ge 5\right)& =1-\left(P\left(X=0\right)+P\left(X=1\right)+P\left(X=2\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}+P\left(X=3\right)+P\left(X=4\right)\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

You’ll have to use the binomial distribution to find the probabilities. That gives you this: $\begin{array}{llll}\hfill P\phantom{\rule{-0.17em}{0ex}}\left(X=0\right)& =\left(\genfrac{}{}{0.0pt}{}{50}{0}\right)\cdot 0.2{5}^{0}\cdot {\left(1-0.25\right)}^{50}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \approx 5.66\cdot 1{0}^{-7}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill P\phantom{\rule{-0.17em}{0ex}}\left(X=1\right)& =\left(\genfrac{}{}{0.0pt}{}{50}{1}\right)\cdot 0.2{5}^{1}\cdot {\left(1-0.25\right)}^{49}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \approx 9.43\cdot 1{0}^{-6}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill P\phantom{\rule{-0.17em}{0ex}}\left(X=2\right)& =\left(\genfrac{}{}{0.0pt}{}{50}{2}\right)\cdot 0.2{5}^{2}\cdot {\left(1-0.25\right)}^{48}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \approx 7.7\cdot 1{0}^{-5}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill P\phantom{\rule{-0.17em}{0ex}}\left(X=3\right)& =\left(\genfrac{}{}{0.0pt}{}{50}{3}\right)\cdot 0.2{5}^{3}\cdot {\left(1-0.25\right)}^{47}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \approx 4.1\cdot 1{0}^{-4}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill P\phantom{\rule{-0.17em}{0ex}}\left(X=4\right)& =\left(\genfrac{}{}{0.0pt}{}{50}{4}\right)\cdot 0.2{5}^{4}\cdot {\left(1-0.25\right)}^{46}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \approx 1.60\cdot 1{0}^{-3}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

The sum of these probabilities is

 $0.002.$

If you insert this into the expression above, you get that

 $P\phantom{\rule{-0.17em}{0ex}}\left(X\ge 5\right)\approx 1-0.002=0.998.$

It seems like Stephen at least gets to go to the Museum of Natural History for free.

If the data set of a binomial distribution becomes large, the set follows a normal distribution rather than the binomial distribution. In that case you can use these formulas:

Rule

### ExpectedValue,VarianceandStandardDeviationfortheBinomialDistribution

The binomial distribution has expected value, variance and standard deviation as follows: $\begin{array}{llll}\hfill E\phantom{\rule{-0.17em}{0ex}}\left(X\right)& =\mu =np\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill \mathrm{Var}\phantom{\rule{-0.17em}{0ex}}\left(X\right)& ={\sigma }^{2}=np\left(1-p\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill \mathrm{SD}\phantom{\rule{-0.17em}{0ex}}\left(X\right)& =\sigma =\sqrt{np\left(1-p\right)}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

If $\mathrm{Var}\phantom{\rule{-0.17em}{0ex}}\left(X\right)>5$, $X$ can be approximated with the normal distribution with expected value $np$ and standard deviation $\sqrt{np\left(1-p\right)}$.

A rule of thumb is that if $np$ and $n\left(1-p\right)$ are both greater than 10, $X$ can be approximated with the normal distribution.