Binomial Random Variables
Manufacturers often monitor production quality by tracking the number of defective items produced in a batch. They might want to know the answer to the question:
What is the probability of producing 3 or fewer defective items in a batch of 100?
In this section, we will introduce the binomial random variable and explore how the binomial probability distribution can be used to answer similar questions.
Binomial Setting
Section titled “Binomial Setting”Random variables can only follow a binomial distribution under certain conditions. A situation that satisfies these conditions is called a binomial setting, which has the following properties:
- There is a fixed number of identical trials, denoted as n.
- Each trial results in one of two outcomes: success (S) or failure (F)
- The probability of success for a single trial remains the same for each trial, denoted by p, where 0 p 1. The probability of failure is q = (1-p).
- The trials are independent.
It is important to note two things. First, a success is not necessarily a “good” result; it is simply a label for one of the two possible outcomes on a single trial. Second, even if a trial originally has more than two possible outcomes, we can often define success and failure in a way that reduces it to two categories.
For example, suppose the random variable counts the number of even rolls when rolling a six-sided die. Although there are six possible outcomes, we can define a success as rolling an even number (2, 4, or 6) and a failure as rolling an odd number (1, 3, or 5). In this way, each trial results in either a success or a failure.
Binomial Distribution
Section titled “Binomial Distribution”The binomial random variable, , represents the number of successes in n trials in a binomial setting. The probability distribution of is called the binomial distribution with parameters n and p.
How can we get the probability distribution of ? We will use a simple example to help answer this question. Suppose a basketball player who makes 70% of free throws attempts 3 shots. The random variable , the number of made shots, is a binomial random variable with n = 3 trials, p = 0.7, and q = 0.3. In this example, making a shot is a success (S) and missing a shot is a failure (F).
The following outcomes represent all possible sequences of makes (S) and misses (F):
When shooting three free throws, the possible number of makes is 0, 1, 2, or 3. Therefore, the possible values of our random variable is 0, 1, 2, or 3.
What is the probability that the basketball player makes exactly 1 shot? We will start by finding the probability of a single specific outcome with 1 made shot. For example, let’s consider the outcome SFF. Since the shots are assumed independent,
Notice that any arrangements containing exactly one success and two failures has the same probability. There are 3 independent arrangements (SFF, FSF, FFS), so the overall probability of is the sum of the probabilities of these three arrangements:
Similarly, we can find the probabilities of , , and to get the full probability distribution of :
Binomial Probability Distribution
Section titled “Binomial Probability Distribution”| Number of Made Shots () | Arrangements | Probability |
|---|---|---|
| 0 | FFF | 1 (0.3) = 0.027 |
| 1 | SFF, FSF, FFS | 3 (0.7) (0.3) = 0.189 |
| 2 | SSF, SFS, FSS | 3 (0.7) (0.3) = 0.441 |
| 3 | SSS | 1 (0.7) = 0.343 |
In most situations it can be difficult to list and keep track of all the possible arrangements. We can use the binomial coefficient to calculate the number of arrangements of k successes in n trials.
We can now generalize our example to get the formula. The count of 3 arrangements becomes the binomial coefficient, the (0.7) term become p, and the (0.3) term becomes q = (1-p). This result is the binomial probability formula.
Binomial Probability Formula
Section titled “Binomial Probability Formula”k = Number of successes
n = Number of independent trials
p = Probability of success for each trial
In summary, we can find the probability of exactly k successes in n trials by multiplying the number of ways to arrange k successes and n − k failures, the probability of k successes, and the probability of n − k failures.
Mean and Standard Deviation
Section titled “Mean and Standard Deviation”Using what we learned about combining random variables, we can find the mean and standard deviation of a binomial random variable by first looking at a single trial. Let’s consider a random variable that is equal to 1 if the trial is a success with probability p, and 0 if the trial is a failure with probability q = (1-p).
Then the mean of is
and the variance of is
Remember that a binomial random variable is a sequence of independent trials with binary outcomes and the same probability of success. If we consider = , where each is independent, then is a binomial random variable.
Applying the rules for combining independent random variables, the mean of a binomial random variable is
and the variance is
Finally the standard deviation is simply the square root of the variance
Mean and Standard Deviation Formulas
Section titled “Mean and Standard Deviation Formulas”n = Number of independent trials
p = Probability of success for each trial
The structure of these formulas reflects the underlying logic of the binomial distribution. If each trial has a constant probability of success p, for example 70%, then we would expect 70% of the trials to be successes.
Notice that as n increases the mean and standard deviation increase. With more trials, we should expect both a larger number of successes on average and a greater spread in the number of successes. When p = 0 or 1, we know the result of each trial (guaranteed success or failure), so standard deviation is 0 and the mean is either 0 or n. Finally, when p = 0.5, the variance is maximized since at this p we are most uncertain about the outcomes.
Definitions
Section titled “Definitions”-
Binomial Setting is a situation where the following properties hold true
- Fixed number of identical trials denoted as n.
- Each trial results in one of two outcomes: success (S) or failure (F)
- The probability of success for a single trial remains the same for each trial, denoted by p. The probability of failure is q = (1-p).
- The trials are independent.
-
Binomial Random Variable is a random variable that counts the number of successes in n independent trials in a binomial setting.
-
Binomial Distribution is the probability distribution of a binomial random variable, describing the probabilities of obtaining 0, 1, 2, …, n successes.
-
Binomial Coefficient is the number of ways to choose or arrange k successes among n trials, given by
-
Binomial Probability Formula gives the probability of observing exactly k successes in n trials, and is calculated as
-
Binomial Random Variable Mean can be calculated by the equation
-
Binomial Random Variable Standard Deviation can be calculated by the equation
Practice Problems
Section titled “Practice Problems”-
In a certain state, approximately 85% of adults with a valid driver’s license own a smartphone. Suppose 100 licensed drivers are randomly selected. For the random variables below, determine whether it is a binomial random variable. If so, give the values of n and p.
a. The number of drivers in the sample who own a smartphone
Solution
Recall that a binomial random variable counts the number of successes in n independent trials in a binomial setting. We start by checking each property of a binomial setting:
-
Fixed number of identical trials — 100 drivers are selected, so there are 100 trials.
-
Two outcomes per trial — We can define success as owning a smartphone and failure as not owning one.
-
Constant probability of success — Each driver has the same probability of owning a smartphone, which is 0.85.
-
Independent trials — Drivers are randomly selected, so the trials are independent.
The properties of the binomial setting are satisfied. Next we want to make sure we are being asked to count the number of successes in a certain number of trials. Indeed, the random variable counts the number of drivers in the sample who own a smartphone, which is the number of successes in 100 trials.
Therefore, this is a binomial random variable with parameters n = 100 and p = 0.85.
b. The ages of the 100 drivers in the sample
Solution
We start by checking each property of a binomial setting:
-
Fixed number of identical trials — 100 drivers are selected, so there are 100 trials.
-
Two outcomes per trial — This property does not hold, since the driver’s age can be many different values and is not a binary outcome.
The properties of the binomial setting are not satisfied. Even though the remaining properties may hold, we can stop here.
Therefore, this is not a binomial random variable, because each trial does not have only two possible outcomes.
c. The number of drivers in the sample who are younger than 40 years old
Solution
We start by checking each property of a binomial setting:
-
Fixed number of identical trials — 100 drivers are selected, so there are 100 trials.
-
Two outcomes per trial — We can define success as being younger than 40 years old and failure as being older than 40 years old.
-
Constant probability of success — While not given, we can assume that each driver has the same probability of being younger than 40 years old, which is the proportion of licensed drivers who are younger than 40.
-
Independent trials — Drivers are randomly selected, so the trials are independent.
The properties of the binomial setting are satisfied. Next we want to make sure we are being asked to count the number of successes in a certain number of trials. Indeed, the random variable counts the number of drivers in the sample under the age of 40, which is the number of successes in 100 trials.
Therefore, this is a binomial random variable with parameters n = 100 and a unknown probability of success p.
d. The number of miles each driver traveled during the past year
Solution
We start by checking each property of a binomial setting:
-
Fixed number of identical trials — 100 drivers are selected, so there are 100 trials.
-
Two outcomes per trial — This property does not hold, since the number of miles traveled can be many different values and is not a binary outcome.
The properties of the binomial setting are not satisfied. Even though the remaining properties may hold, we can stop here.
Therefore, this is not a binomial random variable, because each trial does not have only two possible outcomes.
e. The number of drivers in the sample who own exactly two vehicle
Solution
We start by checking each property of a binomial setting:
-
Fixed number of identical trials — 100 drivers are selected, so there are 100 trials.
-
Two outcomes per trial — We can define success as having exactly two vehicles and failure as having a different number of vehicles.
-
Constant probability of success — While not given, we can assume that each driver has the same probability of having exactly two vehicles, which is the proportion of licensed drivers who own exactly two vehicles.
-
Independent trials — Drivers are randomly selected, so the trials are independent.
The properties of the binomial setting are satisfied. Next we want to make sure we are being asked to count the number of successes in a certain number of trials. Indeed, the random variable counts the number of drivers in the sample who have exactly two vehicles, which is the number of successes in 100 trials.
Therefore, this is a binomial random variable with parameters n = 100 and a unknown probability of success p.
-
-
A chocolate bar factory purchases a new machine to improve production. Quality control engineers find that the machine produces defective chocolate bars at a rate of 5%. To test if the machine is working correctly, the factory independently produces a sample of 200 chocolate bars through the machine.
Let = the number of defective chocolate bars produced.
a. Check that can be modeled as a binomial random variable. Identify parameters n and p.
Solution
Recall that a binomial random variable counts the number of successes in n independent trials in a binomial setting. We start by checking each property of a binomial setting:
-
Fixed number of identical trials — 200 chocolate bars are produced, so there are 200 trials.
-
Two outcomes per trial — We can define success as a defective chocolate bar and failure as a non-defective chocolate bar.
-
Constant probability of success — Each chocolate bar has the same probability of being defective, which is 5% or 0.05.
-
Independent trials — The production of each chocolate bar is independent of the others.
The properties of the binomial setting are satisfied. Next we want to make sure we are being asked to count the number of successes in a certain number of trials. The random variable counts the number of defective chocolate bars produced, which is the number of successes in 200 trials.
Therefore, this is a binomial random variable with parameters n = 200 and p = 0.05.
b. Calculate the mean and standard deviation of . Interpret each value in context.
Solution
The mean is given by
This means that, on average, the machine will produce 10 defective chocolate bars out of 200.
The standard deviation is given by
This means that the number of defective chocolate bars produced will typically vary by about 3.08 from the mean of 10.
c. The factory determines that the machine is underperforming if the number of defective bars is more than one standard deviation above the mean. Find the number of defective bars that at which the machine is considered underperforming.
Solution
In this context, the number of defective bars must be a whole number, so we round up to 14. Therefore, if the machine produces more than 14 defective chocolate bars out of 200, it is considered underperforming.
-
-
Alyssa is taking a multiple-choice practice exam with 10 questions, each having 4 answer choices. She guesses on all questions.
Assume this is a binomial setting. Let = the number of correct answers.
a. Calculate the mean and standard deviation of . Interpret each value in context.
Solution
The mean is given by
This means that, on average, Alyssa will get 2.5 questions correct out of 10.
The standard deviation is given by
This means that the number of correct answers will typically vary by about 1.37 from the mean of 2.5.
b. What is the probability that she gets exactly 3 questions correct?
Solution
We start by identifying the parameters of the binomial distribution. Since there are 10 questions, n = 10. Each question has 4 answer choices, so the probability of guessing correctly is p = 1/4 = 0.25.
We are asked to find . Using the binomial probability formula:
The probability that Alyssa gets exactly 3 questions correct is approximately 0.2503 or25.03%.
c. What is the probability that Alyssa gets between 2 and 5 questions correct?
Solution
We are asked to find . This is the sum of the probabilities of getting exactly 2, 3, 4, or 5 questions correct.
Using the binomial probability formula:
Calculating each term:
Adding these probabilities:
Therefore, the probability that Alyssa gets between 2 and 5 questions correct is approximately 0.7363 or 73.63%.
d. What is the the probability that Alyssa gets at least two questions correct?
Solution
We are asked to find . We could individually calculate the probability of getting 2, 3, 4, 5, 6, 7, 8, 9, 10 questions correct and sum them up. This would be more tedious, we instead note that the sum of all individual probabilities is equal to 1, so we can instead calculate the probability of getting 0 or 1 questions correct and subtract from 1.
Then
Therefore, the probability that Alyssa gets at least two questions correct is approximately 0.7560 or 75.60%.