Binomial Distribution - Probability Distribution Function (PDF)

The binomial probability distribution is a discrete probability distribution, used to model $$n$$ repetitions (we'll speak of $$n$$ trials) of an experiment which has only two possible outcomes:

• Success, or
• Failure
where each trial is independent the pervious.

For such scenarios, we'll define the discrete random variable $$X$$ as the "number of successes in $$n$$ trials".

Typical Question

A biased coin has probability of flipping heads $$p=0.6$$. The coin is flipped $$20$$ times. What is the probability of flipping heads exactly $$4$$ times ?

Comment

This is a typical scenario in which we would use the binomial distribution function. Indeed we can see that:

• an experiment is being repeated $$20$$ times, that's $$20$$ trials
• for each trial there are two possible outcomes: success (flipping heads) or failure (flipping tails)
• each trial is independent of the previous (whatever we get on one flip has no effect on what we get on the next flip).
So we would define the discrete random variable $$X$$ as "the number of successes (in 20 trials)", or as "the number of heads flipped (in 20 trials)". We're therefore looking for $$P\begin{pmatrix} X = 4 \end{pmatrix}$$; that's the probability of $$4$$ successes within the $$20$$ trials.

Binomial Probability Distribution Function (PDF)

Given a discrete random variable $$X$$ that follows a binomial distribution, the probability of $$r$$ successes within $$n$$ trials is given by: $P\begin{pmatrix}X = r \end{pmatrix} = \begin{pmatrix} n \\ r \end{pmatrix}p^rq^{n-r}$ where $$p$$ is the probability of a success and $$q = 1-p$$ is the probability of a failure.

Notation: $$X \sim B \begin{pmatrix}n,p\end{pmatrix}$$

To indicate that a discrete random variable $$X$$ follows a binomial distribution, for $$n$$ trials and for which the probability of success is $$p$$, we write: $X \sim B\begin{pmatrix}n,p\end{pmatrix}$

Tutorial 1: Binomial Probability Distribution

In this tutorial, we learn how to recognize scenarios for the binomial distribution as well as work through a first example, showing how to use the binomial probability distribution function.

Worked Example

A bag contains $$10$$ marbles, $$6$$ of which are blue and $$4$$ are red. An experiment consists of picking a marble (at random) from the bag, making a note of its color and putting it back in the bag. This experiment is repeated $$5$$ times.

What is the probability of picking exactly $$3$$ blue marbles?

Solution

Since the marble is put back in the bag at the end of each trial, the outcome of each pick is independent of the previous. There are only two possible outcomes:

• picking a blue (success)
• not picking a blue (failure)
The corresponding probabilities are:
• picking a blue (success), $$p = \frac{6}{10} = 0.6$$
• not picking a blue (failure), $$p = \frac{4}{10} = 0.4$$
We define the discrete random variable $$X$$ as the "number of blue marbles picked". Using the binomial probability distribution function with $$5$$ trials, $$n = 5$$, probability of a success $$p = 0.6$$, for $$3$$ successes, $$r = 3$$, we find: \begin{aligned} p \begin{pmatrix}X = 3\end{pmatrix} & = \begin{pmatrix} 5 \\ 3 \end{pmatrix}p^3q^{5-3} \\ & = \begin{pmatrix} 5 \\ 3 \end{pmatrix}p^3q^2 \\ & = \begin{pmatrix} 5 \\ 3 \end{pmatrix}(0.6)^3(0.4)^2 \\ p \begin{pmatrix}X = 3\end{pmatrix} & = 0.3456 \end{aligned}

Exercise

1. Charlotte and Clara are planning a 7 day trip to Falkenberg, Sweden. The probability that it rains on any one of those days is 0.3 What is the probability that it rains during exactly 3 of those 7 days?

2. A factory produces bolts that are then sold to car manufacterers. The manufacturing process is such that 1 in 50 chance that their machine produces a faulty bolt (that they can’t sell) and given that the production of each bolt doesn’t affect the production of any other bolt, what is the probability of there being exactly five faulty bolts if they manufacture 200 of them?

3. 8 students sit a highly advanced mathematics test. The probability that a student scores above 80% is 0.1. What is the probability that exactly 4 of the 8 students score higher than $$80 \%$$ ?

4. James likes to play darts. When he plays, on each throw there is a $$20 \%$$ chance that he hits a bullseye. He throws 10 darts in a row. What is the probability that he hits exactly 8 bullseyes?

5. The process with which a famous smartphone company has its phones manufactured is such such that the probability of a phone being faulty is 0.03. In an hour 100 phones are manufactured. What is the probability that exactly 4 of those phones are faulty?

Note: this exercise can be downloaded as a worksheet to practice with: