You are on page 1of 11

CHAPTER 7 Random Variables, Probability Distributions, and Statistics

Section 7.4 – The Binomial Distribution


So far, we have studied some general characteristics of random variables. In the field of
statistics, there are many types of distributions of random variables, depending on the type of
experiment which is being conducted. In the remainder of this text, we will look at two types of
distributions of random variables: the binomial distribution (in this section) and the normal
distribution (in Sections 7.5 and 7.6).

Bernoulli Trials and Binomial Experiments


A Bernoulli trial is an experiment that has exactly two outcomes, “success” and “failure.” We
have already seen some examples of Bernoulli trials. For example, when flipping a coin, we
could define landing on heads as “success”, in which landing on tails is defined as “failure”. We
can also re-cast some earlier experiments and define what we mean by success. For example,
when rolling a die, we can define rolling a 6 as “success” and rolling anything else as “failure.”

If we repeat a Bernoulli trial under certain conditions, we have a binomial experiment, as


defined below.

Binomial Experiments

An experiment is a binomial experiment, provided that the following four


requirements are met:

• Each trial of the experiment has two outcomes, which we can label as
“success” and “failure.” (These are also known as Bernoulli trials.)
• The experiment consists of a specified number of trials.
• The probability of success, p, is the same on each trial.
• The trials are independent (i.e. the outcome of one trial does not affect the
outcome of any other trial).

We can therefore ask the following four questions to determine if an experiment is a binomial
experiment.
1. Are there only two outcomes?
2. Is there a specified number of trials?
3. Is the probability of success, p, the same on each trial?
4. Are the events independent?

If the answer to any of the above four questions is no, then the experiment is not a binomial
experiment.

478 University of Houston Department of Mathematics


SECTION 7.4 The Binomial Distribution

Example 1: Determine if each of the experiments described below is a binomial experiment.


A. A fair die is rolled 10 times to determine the number of times that “a roll is less than 3”.
B. A fair coin is tossed until heads is obtained.

Solution:
A. Checking the requirements for a binomial experiment,
1. Yes, there are 2 outcomes:
“success” = rolling a 1 or a 2
“failure” = rolling a 3, 4, 5, or 6
2. Yes, the number of trials is specified, 10 in this case.
3. Yes, the probability of success is the same on each trial: p = 26 .

4. Yes, the trials are independent, since the outcome of one roll does not affect the
outcome of any other roll.
Since all four conditions are met, this is a binomial experiment.
B. Checking the requirements for a binomial experiment,
1. Yes, there are 2 outcomes: “success” = heads and “failure” = tails.
2. No, the number of trials is not specified, since we do not know how many times
the coin will be tossed until heads is obtained.
We could stop at this point and conclude that the experiment is not a binomial
experiment. The answers to the other two questions are shown below.
3. Yes, the probability of success is the same on each trial. The coin is fair, so
p = 12 .

4. Yes, the trials are independent, since the outcome of one coin toss does not affect
the outcome of any other coin tosses.
This is not a binomial experiment.
***
Example 2: An urn contains 4 green marbles, 3 black marbles, and 2 red marbles. Determine if
each of the experiments described below is a binomial experiment.

A. Three marbles are drawn in succession and without replacement from the urn, noting
each time whether or not the marble is green.
B. Five marbles are drawn in succession and with replacement from the urn, noting each
time whether or not the marble is red.
C. Five marbles are drawn in succession and with replacement from the urn, noting each
time whether the marble is green, black, or red.

MATH 1324 Finite Mathematics with Applications 479


CHAPTER 7 Random Variables, Probability Distributions, and Statistics

Solution: We have created a chart to check each of the requirements for a binomial experiment.

P(Success)
Specified # of Events
2 Outcomes? same for
Trials? independent?
each trial?

A. Yes. Yes, 3. No. No.


“success” = green
“failure” = not green

B. Yes. Yes, 5. 2 Yes.


Yes, p = 9
“success” = red
“failure” = not red

C. No, 3 outcomes are Yes, 5. No. (N/A – Yes.


defined. success has not
been defined.)

Conclusions and explanations:

A. No, the experiment is not a binomial experiment. Since the marbles are not replaced, the
probability of a green marble changes depending on which marble has already been
drawn.

B. Yes, the experiment is a binomial experiment. Notice that the marble is replaced after
each drawn. The events are therefore independent and the probability of success remains
the same.

C. No, the experiment is not a binomial experiment, since it has been designed with three
outcomes rather than two. (Notice that this experiment is nearly identical to part B, but
without a design which allows us to identify “success” and “failure”.)

***
We have already mentioned that we use the letter p to denote the probability of a successful
outcome. Let q represent an unsuccessful outcome. Since there are only two outcomes in a
binomial experiment, p + q = 1 .

Example 3: Suppose that the probability of success in an experiment is 0.64. What is the
probability of failure?

Solution: Since p + q = 1 , we can solve for q to obtain the equation q = 1 − p . Then


q = 1 − 0.64 = 0.36 .

***

480 University of Houston Department of Mathematics


SECTION 7.4 The Binomial Distribution

We can define a random variable X to be the number of successes in a binomial experiment. We


want to be able to find the probability of a given number of successes. Let event S be defined as
success, and event F be defined as failure. Let N denote the sample space. (We usually use S to
denote the sample space, but we are not doing so here.)

Suppose that a binomial experiment consists of 4 trials, where p is the probability of success on
each trial and q is the probability of failure on each trial. We want to find the probability of
exactly 2 successes or exactly 3 successes.

There are 2 4 = 16 outcomes in this experiment. A tree diagram is shown below to display the
sample space.

The sample space N is as follows:

N = {SSSS , SSSF , SSFS , SSFF , SFSS , SFSF , SFFS , SFFF ,


FSSS , FSSF , FSFS , FSFF , FFSS , FFSF , FFFS , FFFF }

There are six outcomes that indicate exactly 2 successes; we will denote this as S2 :
S2 = {SSFF , SFSF , SFFS , FSSF , FSFS , FFSS}

We can find the probability of each outcome occurring, using p as the probability of success and
q as the probability of failure.

MATH 1324 Finite Mathematics with Applications 481


CHAPTER 7 Random Variables, Probability Distributions, and Statistics

P ( X = 2 ) = P ( SSFF ) + P ( SFSF ) + P ( SFFS ) + P ( FSSF ) + P ( FSFS ) + P ( FFSS )


= ( p ⋅ p ⋅ q ⋅ q) + ( p ⋅ q ⋅ p ⋅ q) + ( p ⋅ q ⋅ q ⋅ p) + (q ⋅ p ⋅ p ⋅ q) + (q ⋅ p ⋅ q ⋅ p) + (q ⋅ q ⋅ p ⋅ p)
= p2q 2 + p 2q2 + p2q 2 + p 2q2 + p2q2 + p 2q 2
= 6 p2q2

Note that the probability for each outcome with two successes is the same. Since each of the six
outcomes contains two successes and two failures (in various arrangements), each of the six
probabilities is p 2 q 2 .

There are four outcomes that indicate 3 successes; we will denote this as S3 :
S3 = {SSSF , SSFS , SFSS , FSSS }

We can again find the probability of each outcome occurring, using p as the probability of
success and q as the probability of failure. Then

P ( X = 3) = P ( SSSF ) + P ( SSFS ) + P ( SFSS ) + P ( FSSS )


= ( p ⋅ p ⋅ p ⋅ q) + ( p ⋅ p ⋅ q ⋅ p) + ( p ⋅ q ⋅ p ⋅ p) + (q ⋅ p ⋅ p ⋅ p)
= p3q + p 3q + p 3q + p3q
= 4 p 3q

Note that the probability for each outcome with three successes is the same. Since each of the
four outcomes contains three successes and one failure (in various arrangements), each of the
four probabilities is p 3 q .

For probabilities like the ones above, it can be quite tedious to list all of the outcomes, so we
need a way to simplify the computation.

Recall that the result for 2 successes can be given by P ( X = 2 ) = 6 p 2 q 2 and the result for 3
successes can be given by P ( X = 3) = 6 p3 q1 = 6 p3 q . Notice that the power of p in each result is
the same as the number of successes, and the power of q in each result is the same as the number
of failures. Moreover, the sum of the powers (the number of successes plus the number of
failures) is the same as the number of trials.

Finding the coefficient for P ( X = 2 ) and P ( X = 3) may be less apparent. That value is found
by computing 4 C 2 = 6 for two successes, and 4 C 3 = 4 for three successes.

We can summarize the computation as follows:

P ( X = 2) = 4 C 2 ⋅ p 2q 2 P ( X = 3) = 4 C 3 ⋅ p 3 q

482 University of Houston Department of Mathematics


SECTION 7.4 The Binomial Distribution

We can generalize this computation as follows, and apply it to any number of trials, any number
of successes, and any probability of success.

Probability of r Successes in a Binomial Experiment

The probability of r successes in a binomial experiment is given by the following


formula:

P ( X = r ) = n C r ⋅ p r q n−r

where
r = the number of successes
n = the number of trials
p = the probability of success
q = 1 − p = the probability of failure
n − r = the number of failures
X is a random variable representing the number of successes in the experiment

Example 4: Suppose that a binomial experiment consists of tossing a biased coin 6 times and
observing if the coin lands on heads or on tails. The probability that the coin lands on heads is
0.56. Find the probability that the coin lands on heads exactly 4 times.

Solution: Define success to mean the coin lands on heads. In this binomial experiment, the
number of trials, n, is 6.

The probability of success is p = 0.56 , which means that the probability of failure is
q = 1 − 0.56 = 0.44 .

We want to find the probability that 4 heads occur, so r = 4 .

Using the formula P ( X = r ) = n C r ⋅ p r q n − r ,

4 6−4
P ( X = 4 ) = 6 C 4 ( 0.56 ) ( 0.44 )
4 2
= 6 C 4 ( 0.56 ) ( 0.44 )
= 0.2856.

The probability that the coin lands on heads exactly 4 times is 0.2856.

***

MATH 1324 Finite Mathematics with Applications 483


CHAPTER 7 Random Variables, Probability Distributions, and Statistics

Example 5: An automotive service station finds that the probability that a car passes emissions
inspections is 0.81. Suppose that 12 cars are inspected. Find each of the following probabilities.

A. The probability that all cars passed the inspection.


B. The probability that at least 1 car did not pass inspection.
C. The probability that at least 10 cars passed inspection.
D. The probability that at most 10 cars passed inspection.

Solution: Define success to mean that a car passed the emission inspection. In this binomial
experiment, the number of trials, n, is 12. The probability of success is p = 0.81 , which means
that the probability of failure (that is, that the car did not pass emissions inspection) is
q = 1 − 0.81 = 0.19 . Random variable X represents the number of cars passing inspection.

Remember that we are using the formula P ( X = r ) = n C r ⋅ p r q n − r .

A. If all cars passed inspection, then r = 12 , and we want to find P ( X = 12 ) .


P ( X = r ) = n C r ⋅ p r q n−r
12 12 −12
P ( X = 12 ) = 12 C 12 ( 0.81) ( 0.19 )
12 0
= 12 C 12 ( 0.81) ( 0.19 )
≈ 0.0798

B. We want to find the probability that at least 1 car did not pass inspection. If we restate
this in terms of failures, we want to find the probability that there is at least 1 failure.

We could find P ( at least 1 failure ) by computing the following 12 probabilities:


P (1 failure ) + P ( 2 failures ) + ... + P (11 failures ) + P (12 failures ) ,
which in terms of successes is
P ( X = 11) + P ( X = 10 ) + ... + P ( X = 1) + P ( X = 0 )

The above computation would be quite tedious. It is much more efficient to use the
complement of the event that is described, find its probability and then subtract from 1.
The only outcome not included in “at least 1 failure” is the outcome “0 failures”.
Therefore,

P ( at least 1 failure ) = 1 − P ( 0 failures )

We need to state this in terms of success rather than in terms of failures. If no cars failed
the inspection, then all 12 cars passed the inspection.

484 University of Houston Department of Mathematics


SECTION 7.4 The Binomial Distribution

P ( at least 1 failure ) = 1 − P ( 0 failures )


= 1 − P (12 successes )
= 1 − P ( X = 12 )

We computed P ( X = 12 ) in part A and found this value to be 0.0798. Therefore,

P ( at least 1 failure ) = 1 − P ( X = 12 )
= 1 − 0.0798
= 0.9202

The probability that at least 1 of the 12 cars did not pass inspection is 0.9202.

C. If at least 10 cars passed inspection, then 10 or 11 or 12 cars passed inspection. We will


compute this directly.

P ( X ≥ 10 ) = P ( X = 10 ) + P ( X = 11) + P ( X = 12 )
10 2 11 1 12 0
= 12 C 10 ( 0.81) ( 0.19 ) + 12 C 11 ( 0.81) ( 0.19 ) + 12 C 12 ( 0.81) ( 0.19 )
≈ 0.2897 + 0.2245 + 0.0798
≈ 0.5940

D. If at most 10 cars passed inspection, then 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or


10 cars passed inspection. It is easier to compute this result using the complement.

Then

P ( X ≤ 10 ) = 1 − P ( X > 10 )
= 1 −  P ( X = 11) + P ( X = 12 ) 

We already computed P ( X = 11) and P ( X = 12 ) in part C. Therefore,

P ( X ≤ 10 ) = 1 −  P ( X = 11) + P ( X = 12 ) 

= 1 −  12 C 11 ( 0.81) 
11 1 12 0
 ( 0.19 ) + 12 C 12 ( 0.81) ( 0.19 ) 
≈ 1 − [0.2245 + 0.0798]
≈ 1 − 0.3043
≈ 0.6957

***

MATH 1324 Finite Mathematics with Applications 485


CHAPTER 7 Random Variables, Probability Distributions, and Statistics

Example 6: A company ships its products in packages of 25 units. Past history shows that, on
average, 2 items in each package are defective. Find the probability of each event.

A. None of the items in the package are defective.


B. All of the items in the package are defective.
C. Exactly 3 of the items in the package are defective.
D. At least 22 of the items in the package are good.
E. At least 3 of the items in the package are defective.

Solution: In any binomial experiment, we can choose which of the two outcomes we define as
“success” and which outcome we define as “failure”. Most of the above questions allude to the
number of items that are defective, rather than the number of items that are good. We therefore
define “success” to be that an item is defective. “Failure” then means that an item is not defective
(which means that it is good).
2
If 2 out of 25 items are defective, then p = 25 = 0.08 (the probability that an item is defective).

Then q = 1 − 0.08 = 0.92 (the probability that an item is good).

A. If none of the items are defective, then we want to find P ( X = 0 ) :


0 25
P ( X = 0 ) = 25 C 0 ( 0.08 ) ( 0.92 ) ≈ 0.1244 .

B. If all of the items are defective, then we want to find P ( X = 25 ) :


25 0
P ( X = 25 ) = 25 C 25 ( 0.08 ) ( 0.92 ) ≈ 3.7779 × 10 −28

We can write the probability as 0.0000000000000000000000000003779, so this


probability is extremely unlikely and is essentially zero.

C. If exactly 3 of the items are defective, we want to find P ( X = 3) :


3 22
P ( X = 3) = 25 C 3 ( 0.08 ) ( 0.92 ) ≈ 0.1881

D. If at least 22 of the items are good, then at most 3 of the items are defective. We want to
find P ( X ≤ 3) . It is easiest to compute this directly, as shown below. (The complement
would require many more computations.)

P ( X ≤ 3) = P ( X = 0 ) + P ( X = 1) + P ( X = 2 ) + P ( X = 3) . We have computed 2 of these


probabilities in earlier parts of this example, so we only need to compute P ( X = 1) and
P ( X = 2 ) . We have

486 University of Houston Department of Mathematics


SECTION 7.4 The Binomial Distribution

1 24
P ( X = 1) = 25 C 1 ( 0.08 ) ( 0.92 ) ≈ 0.2704
2 23
P ( X = 2 ) = 25 C 2 ( 0.08 ) ( 0.92 ) ≈ 0.2821

So

P ( X ≤ 3) = P ( X = 0 ) + P ( X = 1) + P ( X = 2 ) + P ( X = 3)
≈ 0.1244 + 0.2704 + 0.2821 + 0.1881
≈ 0.8650

Note: If we had entered all computations in the calculator at the same time and then
rounded the final answer (rather than rounding them separately and then adding them
together), we would have obtained a slightly more accurate answer of 0.8649.

E. If at least 3 of the items are defective, we want to find P ( X ≥ 3) . We would need to


perform many computations to do this problem directly:

P ( X ≥ 3) = P ( X = 3) + P ( X = 4 ) + ... + P ( X = 24 ) + P ( X = 25 ) .

We will instead answer this problem using the complement:

P ( X ≥ 3) = 1 − P ( X < 3)
= 1 −  P ( X = 0 ) + P ( X = 1) + P ( X = 2 ) 

We found all of needed values in earlier parts of this example. Substituting and
evaluating,

1 − P ( X < 3) = 1 −  P ( X = 0 ) + P ( X = 1) + P ( X = 2 ) 
≈ 1 − [ 0.1244 + 0.2704 + 0.2821]
≈ 1 − 0.6769
≈ 0.3231

***

Mean, Variance and Standard Deviation


In Section 7.3, we learned formulas for the mean, variance and standard deviation which applied
to all random variables. When working with binomial random variables, we can use the
simplified formulas listed below. (The proof of the formulas is beyond the scope of this text and
will not be shown here.)

MATH 1324 Finite Mathematics with Applications 487


CHAPTER 7 Random Variables, Probability Distributions, and Statistics

Mean, Variance and Standard Deviation


for Binomial Random Variables

Suppose that X is a binomial random variable where n is the number of trials, p is


the probability of success and q is the probability of failure. Then the mean,
variance and standard deviation of the random variable are as follows:

Mean: µ = E ( x ) = np
Variance: σ 2 = Var ( X ) = npq
Standard Deviation: σ = Var ( X ) = npq

Note that these formulas apply only to binomial random variables.

Example 7: Suppose that a binomial experiment consists of tossing a biased coin 6 times and
observing if the coin lands on heads or on tails. The probability that the coin lands on heads is
0.56. Find the mean, variance and standard deviation of this binomial experiment.

Solution: In this experiment, the number of trials is n = 6 . The probability of success is


p = 0.56 , which means that the probability of failure is q = 1 − 0.56 = 0.44 .

µ = E ( x ) = np = 6 ( 0.56 ) = 3.36
σ 2 = Var ( X ) = npq = 6 ( 0.56 )( 0.44 ) = 1.4784
σ = Var ( X ) = npq = 6 ( 0.56 )( 0.44 ) = 1.4784 ≈ 1.2159

The mean is 3.36, the variance is 1.4784 and the standard deviation is 1.2159.
***
Example 8: An automotive service station finds that the probability that a car passes emissions
inspections is 0.81. Suppose that 12 cars are inspected. Find the mean, variance and standard
deviation of this binomial experiment.

Solution: In this experiment the number of trials is n = 12 . The probability of success is


p = 0.81 , which means that the probability of failure is q = 1 − 0.81 = 0.19 . Therefore,

µ = E ( x ) = np = 12 ( 0.81) = 9.72
σ 2 = Var ( X ) = npq = 12 ( 0.81)( 0.19 ) = 1.8468
σ = Var ( X ) = npq = 12 ( 0.81)( 0.19 ) = 1.8468 ≈ 1.3590

The mean is 9.72, the variance is 1.8468 and the standard deviation is 1.3590.
***
488 University of Houston Department of Mathematics

You might also like