CH 03
CH 03
for Engineers
Seventh Edition
Douglas C. Montgomery George C. Runger
Chapter 3
Discrete Random Variables & Probability Distributions
Chapter 3 Title Slide
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 1
3 Discrete Random Variables and
Probability Distributions
CHAPTER OUTLINE
3.1 Probability Distributions and 3.6 Geometric and Negative
Probability Mass Functions Binomial Distributions
3.2 Cumulative Distribution 3.7 Hypergeometric Distribution
Functions 3.8 Poisson Distribution
3.3 Mean and Variance of a
Discrete Random Variable
3.4 Discrete Uniform Distribution
3.5 Binomial Distribution
Chapter 3 Contents
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 2
Learning Objectives for Chapter 3
After careful study of this chapter, you should be able to do the following:
1. Determine probabilities from probability mass functions and the reverse.
2. Determine probabilities and probability mass functions from cumulative
distribution functions and the reverse.
3. Calculate means and variances for discrete random variables.
4. Understand the assumptions for discrete probability distributions.
5. Select an appropriate discrete probability distribution to calculate
probabilities.
6. Calculate probabilities and determine means and variances for some
common discrete probability distributions.
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 3
Example 3.1 | Flash Recharge Time
• The time to recharge the flash is tested in three
cellphone cameras Table 3.1 Camera Flash Tests
o The probability that a camera passes the test is 0.8 Camera #
and the cameras perform independently. 1 2 3 Probability X
• Table 3.1 shows the sample space for the experiment Pass Pass Pass 0.512 3
and associated probabilities. Fail Pass Pass 0.128 2
Pass Fail Pass 0.128 2
o For example, because the cameras are Fail Fail Pass 0.032 1
independent, the probability that the first and Pass Pass Fail 0.128 2
second cameras pass the test and the third one Fail Pass Fail 0.032 1
fails, denoted as 𝑝𝑝𝑓, is Pass Fail Fail 0.032 1
𝑃(𝑝𝑝𝑓) = (0.8)(0.8)(0.2) = 0.128 Fail Fail Fail 0.008 0
Sum 1.000
• The random variable 𝑋 denotes the number of cameras
that pass the test. The last column shows the values of
𝑋 assigned to each outcome of the experiment.
Sec 3.1 Probability Distributions and
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 4
Mass Functions
Probability Distributions
• A random variable is a function that assigns a real number to each outcome
in the sample space of a random experiment.
TTTTT X=0
HTTTT
THTTT
TTHTT X=1
TTTHT
TTTTH
Hence, the random variable X is a function that assigns a real number value to an outcome (for
this particular random variable, the values are always integers between 0 and 5).
Range of Random Variables
‘‘A random variable is actually a real-valued function that assigns a
numerical value to each possible outcome of the random experiment.’’
• I toss a coin until the first heads (H) appears. Let Y be the
total number of coin tosses.
.
Examples
Example
The number of flaws in a 1-inch length of copper wire manufactured
by a certain process varies from wire to wire. Overall, 48% of the
wires produced have no flaws, 39% have one flaw, 12% have two
flaws, and 1% have three flaws.
Let X be the number of flaws in a randomly selected piece of wire. List
the possible values of the random variable X and find the probabilities
of each of them.
Example 3.3 | Digital Channel
• There is a chance that a bit transmitted
through a digital transmission channel is
received in error.
• Let 𝑋 equal the number of bits received in
error in the next 4 bits transmitted.
• The associated probability distribution of
Figure 3.1 Probability distribution for bits in error.
𝑋 is shown in the table.
• The probability distribution of 𝑋 is given by P(X =0) = 0.6561
the possible values along with their P(X =1) = 0.2916
probabilities. P(X =2) = 0.0486
P(X =3) = 0.0036
P(X =4) = 0.0001
Sec 3.1 Probability Distributions and
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
1.0000
Mass Functions 13
Probability Mass Function
For a discrete random variable 𝑋 with possible values 𝑥1, 𝑥2, … , 𝑥𝑛, a
probability mass function is a function such that:
(1) 𝑓 𝑥𝑖 ≥ 0
(2) σ𝑛𝑖=1 𝑓 𝑥𝑖 = 1
(3) 𝑓 𝑥𝑖 = 𝑃(𝑋 = 𝑥𝑖 )
Hours Count
1 19
2 51
3 86
4 102
5 87
6 62
7 40
8 18
9 14
10 11
15 10
(Solve by yourself)
Cumulative Distribution Function
and Properties
The cumulative distribution function, is the probability that a random variable 𝑋
with a given probability distribution, will be found at a value less than or equal to 𝑥.
Symbolically,
𝐹 𝑥 = 𝑃 𝑋 ≤ 𝑥 = 𝑓 𝑥𝑖
𝑥𝑖 ≤𝑥
(2) 0 ≤ 𝐹 𝑥 ≤ 1
0 𝑥 < −2
0.2 −2≤𝑥 <0
𝐹 𝑥 =
0.7 0≤𝑥<2
1 2≤𝑥 Figure 3.3 Cumulative Distribution Function
Note
𝑓 −2 = 0.2 − 0 = 0.2 Even if the random variable 𝑋 can assume only
𝑓 0 = 0.7 − 0.2 = 0.5 integer values, the cumulative distribution
𝑓 2 = 1.0 − 0.7 = 0.3 function is defined at non-integer values.
𝑃𝑀𝐹 𝐶𝐷𝐹
𝑝(𝑥) F(x)
1
2/6
3/6
2/6 3/6
1/6
1/6 𝑥
𝑥
1 2 4 1 2 4
Example
Example
Suppose a day’s production of 850 parts contains 50 defective parts. Two
parts are selected at random, without replacement, from the batch. Let the
random variable X equal the number of defective parts. What is the
cumulative distribution function (cdf) of X?
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 26
Mean and Variance of a Discrete Random
Variable
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 27
Mean and Variance of a Discrete Random
Variable
• Used to summarize a probability Mean or expected value
distribution
𝜇 = 𝐸 𝑋 = 𝑥𝑓(𝑥)
• Mean: measure of center or middle of
𝑥
the probability distribution
• For a discrete random variable, a weighted
average of possible values with weights Variance
equal to probabilities 𝜎2 = 𝑉 𝑋 = 𝐸 𝑋 − 𝜇 2
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 28
Figure Distributions with equal means and
unequal dispersions
Mean Variance
5
𝜇 = 𝐸 𝑋 = 0𝑓 0 + 1𝑓 1 + 2𝑓 2 + 3𝑓 3 + 𝜎 2 = 𝑉 𝑋 = 𝑓 𝑥𝑖 𝑥𝑖 − 0.4 2
= 0.36
4𝑓 4 = 0 0.6561 + 1 0.2916 + 2 0.0486 +
𝑖=1
3 0.0036 + 4 0.0001 = 0.4
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 30
Example
2-32
Example
A certain industrial process is brought down for recalibration
whenever the quality of the items produced falls below
specifications. Let X represent the number of times the process is
recalibrated during a week and assume that X has the following
probability mass function.
x 0 1 2 3 4
p(x) 0.35 0.25 0.20 0.15 0.05
Find the mean and variance of X.
𝐸[ℎ(𝑥)] = ℎ(𝑥)𝑓(𝑥)
𝑥
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 35
Example 3.9 | Digital Channel
• In Example 3.7, 𝑋 is the number of bits received in error of the next 4 transmitted.
• The probabilities are shown in the table in the 𝑓 𝑥 column.
• What is the expected value of the square of the number of bits in error?
• ℎ 𝑋 = 𝑋2
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 36
Example
Discrete Uniform Distribution
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 38
Mean and Variance of Discrete Uniform
Distribution
• Let 𝑋 be a discrete random variable ranging from 𝑎, 𝑎 + 1, 𝑎 +
2, … , 𝑏, 𝑓𝑜𝑟 𝑎 ≤ 𝑏.
• There are 𝑏 – (𝑎 − 1) values in the inclusive interval.
• Therefore 𝑓(𝑥) = 1/(𝑏 − 𝑎 + 1)
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 39
Example 3.11 | Number of Voice Lines
Let the random variable 𝑋 denote the number of the 48 voice lines that are in use at a particular
time. Assume that 𝑋 is a discrete uniform random variable with a range of 0 to 48.
Find 𝐸(𝑋) & 𝜎.
Practical Interpretation
The average number of lines in use is 24, but the dispersion
(as measured by 𝜎) is large. Therefore, at many times far
more or fewer than 24 lines are used.
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 40
The Bernoulli Distribution
We use the Bernoulli distribution when we have an experiment
which can result in one of two outcomes. One outcome is
labeled “success,” and the other outcome is labeled “failure.”
➢ X = 0(1 − p) + 1( p) = p
➢ X2 = (0 − p) 2 (1 − p) + (1 − p) 2 ( p) = p(1 − p)
Example
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 51
Example 3.14: Binomial Coefficient
Exercises in binomial coefficient calculation:
10 10! 10 ⋅ 9 ⋅ 8 ⋅ 7!
= = = 120
3 3! 7! 3 ⋅ 2 ⋅ 1 ⋅ 7!
15 15! 15 ⋅ 14 ⋅ 13 ⋅ 12 ⋅ 11 ⋅ 10!
= = = 3,003
10 10! 5! 5 ⋅ 4 ⋅ 3 ⋅ 2 ⋅ 1 ⋅ 10!
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 52
Example 3.15a: Organic Pollution
Each sample of water has a 10% chance of containing a particular organic pollutant.
Assume that the samples are independent with regard to the presence of the pollutant. Find
the probability that, in the next 18 samples, exactly 2 contain the pollutant.
Answer: Let 𝑋 denote the number of samples that contain the pollutant in the next 18
samples analyzed. Then 𝑋 is a binomial random variable with 𝑝 = 0.1 and 𝑛 = 18.
18
𝑃 𝑋=2 = 0.12 1 − 0.1 18−2
= 153 0.1 2
0.9 16
= 0.2835
2
In Microsoft Excel®, use the BINOMDIST function to calculate 𝑃 𝑋 = 2 by:
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 53
Example 3.15b: Organic Pollution
Determine the probability that at least 4 samples contain the pollutant.
Answer: The problem calls for calculating 𝑃 𝑋 ≥ 4 but is easier to calculate the
complementary event, 𝑃 𝑋 ≤ 3 , so that:
3
18
𝑃 𝑋 ≥4 =1− 0.1𝑥 0.9 18−𝑥 = 1 − 0.150 + 0.300 + 0.284 + 0.168 = 0.098
𝑥
𝑥=0
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 54
Example 3.15c: Organic Pollution
Determine the probability that 3 ≤ 𝑋 < 7.
Answer:
6
18
𝑃 3≤𝑋<7 = 0.1𝑥 0.9 18−𝑥
= 0.168 + 0.070 + 0.022 + 0.005 = 0.265
𝑥
𝑥=3
In Microsoft Excel®, use the BINOMDIST function to calculate 𝑃 3 ≤ 𝑋 < 7 by:
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 55
Binomial Mean and Variance
If 𝑋 is a binomial random variable with parameters 𝑝 and 𝑛,
• The mean of 𝑋 is:
𝜇 = 𝐸(𝑋) = 𝑛𝑝
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 56
Example 3.16 | Binomial Mean and Variance
For the number of transmitted bits received in error in Example 3.13, 𝑛 = 4 and
𝑝 = 0.1. Find the mean and variance of the binomial random variable.
Answer:
𝜇 = 𝐸 𝑋 = 𝑛𝑝 = 4 ⋅ 0.1 = 0.4
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 57
Example
Let 𝑋 denote the number of samples analyzed until a large particle is detected. Then
𝑋 is a geometric random variable with parameter 𝑝 = 0.01.
The mean number of bits transmitted until the next error, after 50 bits have already been
transmitted, is 1/0.1 = 10, the same result as the mean number of bits until the first error.
Let 𝑋 denote the number of cameras tested until three failures have been obtained.
The requested probability is 𝑃(𝑋 ≤ 5). Here 𝑋 has a negative binomial distribution
with 𝑝 = 0.2 and 𝑟 = 3. Therefore,
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 78
Poisson Distribution
• X: the number of events occurred in a fixed interval of time or space
• The number of births per hour during a given day
• The number of particles emitted by a radioactive source in a given time
• The number of cases of a disease in different towns
• The number of hits on a web site in one hour
• The number of goals scored by a football team in a match
• The number of accidents in a certain part of the road
• The number of customers who enters a market during an hour
Poisson Distribution
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 80
Example 3.27a | Wire Flaws
• Flaws occur at random along the length of a thin copper wire.
• Let 𝑋 denote the random variable that counts the number of flaws in a length of 𝑇 𝑚𝑚 of wire and
suppose that the average number of flaws is 2.3 𝑝𝑒𝑟 𝑚𝑚.
• Find the probability of exactly 10 𝑓𝑙𝑎𝑤𝑠 𝑖𝑛 5 𝑚𝑚 of wire.
Let 𝑋 denote the number of flaws in 5 mm of wire. Then 𝑋 has the Poisson distribution with
Therefore,
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 81
Example 3.27b | Wire Flaws
• Find the probability of at least 1 𝑓𝑙𝑎𝑤 𝑖𝑛 2 𝑚𝑚 of wire.
Let 𝑋 denote the number of flaws in 2 mm of wire. Then 𝑋 has the Poisson distribution with
Therefore,
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 82
Poisson Mean & Variance
• The mean and variance of the Poisson model are the same.
• For example, if particle counts follow a Poisson distribution with a mean of 25
particles per square centimeter, the variance is also 25 and the standard deviation of
the counts is 5 per square centimeter.
• If the variance of a data is much greater than the mean, then the Poisson distribution
would not be a good model for the distribution of the random variable.
Sec 3.8 Poisson Distribution
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 83
Example
Particles are suspended in a liquid medium at a concentration of
10 particles per mL. A large volume of the suspension is
thoroughly agitated, and then 1 mL is withdrawn. What is the
probability that exactly eight particles are withdrawn?
Example
Particles are suspended in a liquid medium at a concentration of
6 particles per mL. A large volume of the suspension is
thoroughly agitated, and then 3 mL are withdrawn. What is the
probability that exactly 15 particles are withdrawn?
Example
Grandma bakes chocolate chip cookies in batches of 100. She puts
300 chips into the dough. When the cookies are done, she gives you
one.
What is the probability that your cookie contains no chocolate chips?
Important Terms & Concepts of Chapter 3
Chapter 3 Important Terms and Concepts Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 87