Discrete Random Variables and Probability Distributions 2023-05-30 00 - 19 - 36
Discrete Random Variables and Probability Distributions 2023-05-30 00 - 19 - 36
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.
(1) 𝑓 𝑥𝑖 ≥ 0
(2) σ𝑛𝑖=1 𝑓 𝑥𝑖 = 1
(3) 𝑓 𝑥𝑖 = 𝑃(𝑋 = 𝑥𝑖 )
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.
(2) 0 ≤ 𝐹 𝑥 ≤ 1
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 20
Example 3.7 | Digital Channel
• In Example 3.3, there is a chance that a bit 𝑥 (𝑥 − 0.4) (𝑥 − 0.4)2 𝑓(𝑥) 𝑓(𝑥)(𝑥 − 0.4)2
transmitted through a digital transmission
channel is received in error. 𝑋 is the number of 0 −0.4 0.160 0.6561 0.1050
bits received in error of the next 4 transmitted. 1 0.6 0.360 0.2916 0.1050
• The probabilities are shown in the table in the 2 1.6 2.560 0.0486 0.1244
𝑓 𝑥 column.
3 2.6 6.760 0.0036 0.0243
• Use the table to calculate the mean &
variance. 4 3.6 12.960 0.0001 0.0013
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 21
Expected Value of a Function of a Discrete
Random Variable
• If 𝑋 is a discrete random variable with probability mass function 𝑓(𝑥)
𝐸[ℎ(𝑥)] = ℎ(𝑥)𝑓(𝑥)
𝑥
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 22
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 23
Discrete Uniform Distribution
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 24
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 25
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 26
Binomial Distribution
The random variable 𝑋 that equals the number of trials that result in a
success is a binomial random variable with parameters
0 < 𝑝 < 1 and 𝑛 = 1, 2, … .
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 27
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 28
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 29
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 30
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 31
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 32
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 33
Geometric Distribution
• Binomial distribution has
• Fixed number of trials
• Random number of successes
• Geometric distribution has reversed roles
• Random number of trials
• Fixed number of successes, in this case 1
Let 𝑋 denote the number of samples analyzed until a large particle is detected. Then
𝑋 is a geometric random variable with parameter 𝑝 = 0.01.
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 47
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 48
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 49
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 50
Important Terms & Concepts of Chapter 3
Chapter 3 Important Terms and Concepts Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 51