#### Transcript MATH30-6 Lecture 7

```Discrete Random Variables and
Probability Distributions
MATH30-6
Probability and Statistics
Objectives
At the end of the lesson, the students are expected to
• Determine probabilities from the probability mass
functions and the reverse;
• Determine probabilities from cumulative distribution
functions and cumulative distribution functions from
probability mass functions, and the reverse;
• Calculate the means and variances for discrete random
variables;
• Understand the assumptions for some common
discrete probability distributions;
Objectives
At the end of the lesson, the students are expected to
• Select an appropriate discrete probability distribution
to calculate probabilities in specific applications; and
• Calculate probabilities, determine means and variances
for some common discrete probability distributions.
Probability Mass Function
For a discrete random variable X with possible values
𝑥1 , 𝑥2 , … , 𝑥𝑛 , a probability mass function is a function
such that
(1) 𝑓 𝑥𝑖 ≥ 0
(2) 𝑛𝑖=1 𝑓 𝑥𝑖 = 1
(3) 𝑓 𝑥𝑖 = 𝑃 𝑋 = 𝑥𝑖
(3-1)
Probability Mass Function
Examples:
3-4/68 Digital Channel There is a chance that a bit
transmitted through a digital transmission channel is
received in error. Let X equal the number of bits in error in
the next four bits transmitted. The possible values for X
are {0, 1, 2, 3, 4}. Based on a model for errors that is
presented in the following section, probabilities for these
values will be determined. Suppose that the probabilities
are
𝑃 𝑋 = 0 = 0.6561 𝑃 𝑋 = 1 = 0.2916
𝑃 𝑋 = 2 = 0.0486 𝑃 𝑋 = 3 = 0.0036
𝑃 𝑋 = 4 = 0.0001
Probability Mass Function
The probability distribution of X is specified by the
possible values along with the probability of each. A
graphical description of the probability distribution of X is
shown on Fig. 3-1.
Practical Interpretation: A random experiment can often
be summarized with a random variable and its
distribution. The details of the sample space can often be
omitted.
Probability Mass Function
Probability Mass Function
3-5/69 Wafer Contamination Let the random variable X
denote the number of semiconductor wafers that need to
be analyzed in order to detect a large particle of
contamination. Assume that the probability that a wafer
contains a large particle is 0.01 and that the wafers are
independent. Determine the probability distribution of X.
Probability Mass Function
3-14/69 The sample space of a random experiment is {a,
b, c, d, e, f}, and each outcome is equally likely. A random
variable is defined as follows:
outcome
x
a
0
Determine the probability
probability mass function
probabilities:
(a) 𝑃 𝑋 = 2
(b) 𝑃
(c) 𝑃 𝑋 > 3
(d) 𝑃
(e) 𝑃 𝑋 = 0 or 𝑋 = 2
b
0
c
1.5
d
1.5
e
2
f
3
mass function of X. Use the
to determine the following
0.6 < 𝑋 < 2.7
0≤𝑋<2
Probability Mass Function
For Exercises 3-15 to 3-18, verify that the following
functions are probability mass functions, and determine
the requested probabilities.
3-15/70
x
─2
─1
0
1
2
f(x)
1/8
2/8
2/8
2/8
1/8
(a) 𝑃 𝑋 ≤ 1
(c) 𝑃 −1 ≤ 𝑋 ≤ 1
(b) 𝑃 𝑋 > −1
(d) 𝑃 𝑋 ≤ −1 or 𝑋 = 2
Probability Mass Function
3-16/70 𝑓 𝑥 = 8 7 1 2 𝑥 , 𝑥 = 1, 2, 3
(a) 𝑃 𝑋 ≤ 1
(b) 𝑃 𝑋 > 2
(c) 𝑃 2 < 𝑋 < 6
(d) 𝑃 𝑋 ≤ 1 or 𝑋 > 1
3-17/70 𝑓 𝑥 =
(a) 𝑃 𝑋 = 1
(c) 𝑃 2 ≤ 𝑋 < 4
2𝑥+1
,𝑥
25
= 0, 1, 2, 3, 4
(b) 𝑃 𝑋, = 2
(d) 𝑃 𝑋 > −10
3-18/70 𝑓 𝑥 = 3 4 1 4 𝑥 , 𝑥 = 0, 1, 2, …
(a) 𝑃 𝑋 = 2
(b) 𝑃 𝑋 ≤ 2
(c) 𝑃 𝑋 > 2
(d) 𝑃 𝑋 ≥ 1
Probability Mass Function
3-21/70 In a semiconductor manufacturing process, three
wafers from a lot are tested. Each wafer is classified as
pass or fail. Assume that the probability that a wafer
passes the test is 0.7 and that wafers are independent.
Determine the probability mass function of the number of
wafers from a lot that pass the test.
Probability Mass Function
3-23/70 A disk drive manufacturer sells storage devices
with capacities of one terabyte, 500 gigabytes, and 100
gigabytes with probabilities 0.5, 0.3, and 0.2, respectively.
The revenues associated with the sales in that year are
estimated to be \$50 million, \$25 million, and \$10 million,
respectively. Let X denote the revenue of storage devices
during that year. Determine the probability mass function
of X.
Cumulative Distribution Function
The cumulative distribution function of a discrete
random variable X, denoted as 𝐹 𝑥 , is
𝐹 𝑥 =𝑃 𝑋≤𝑥 =
𝑓 𝑥𝑖
𝑥𝑖 ≤𝑥
For discrete random variable X, 𝐹 𝑥
following properties.
(1) 𝐹 𝑥 = 𝑃 𝑋 ≤ 𝑥 = 𝑥𝑖 ≤𝑥 𝑓 𝑥𝑖
(2) 0 ≤ 𝐹 𝑥 ≤ 1
(3) If 𝑥 ≤ 𝑦, then 𝐹 𝑥 ≤ 𝐹 𝑦
(3-2)
satisfies the
Cumulative Distribution Function
Examples:
3-7/72 Determine the probability mass function of X from
the following cumulative distribution function:
0, < −2
0.2, −2 ≤ 𝑥 < 0
𝐹 𝑥 =
0.7, 0 ≤ 𝑥 < 2
1, 2 ≤ 𝑥
Cumulative Distribution Function
Cumulative Distribution Function
3-8/72 Sampling without Replacement Suppose that a
day’s production of 850 manufactured parts contains 50
parts that do not conform to customers requirements.
Two parts are selected at random, without replacement,
from the batch. Let the random variable X equal the
number of nonconforming parts in the sample. What is
the cumulative distribution function of X?
Cumulative Distribution Function
Cumulative Distribution Function
3-32/73 Determine the cumulative distribution function
of the random variable in Exercise 3-14.
outcome
x
a
0
b
0
c
1.5
d
1.5
e
2
f
3
3-33/73 Determine the cumulative distribution function
for random variable in Exercise 3-15; also determine the
following probabilities:
(a) 𝑃 𝑋 ≤ 1.25
(b) 𝑃 𝑋 ≤ 2.2
(c) 𝑃 −1.1 < 𝑋 ≤ 1
(d) 𝑃 𝑋 > 0
x
f(x)
─2
1/8
─1
2/8
0
2/8
1
2/8
2
1/8
Cumulative Distribution Function
3-34/73 Determine the cumulative distribution function
for the random variable in Exercise 3-16; also determine
the following probabilities:
(a) 𝑃 𝑋 < 2
(b) 𝑃 𝑋 ≤ 3
(c) 𝑃 𝑋 > 2
(d) 𝑃 1 < 𝑋 ≤ 2
𝑓 𝑥 = 8 7 1 2 𝑥 , 𝑥 = 1, 2, 3
Cumulative Distribution Function
3-40/73 Errors in an experimental transmission channel
are found when the transmission is checked by a certifier
that detects missing pulses. The number of errors found
in an eight-bit byte is a random variable with the
following distribution:
0, 𝑥 < 1
0.7, 1 ≤ 𝑥 < 4
𝐹 𝑥 =
0.9, 4 ≤ 𝑥 < 7
1, 7 ≤ 𝑥
Determine each of the following probabilities:
(a) 𝑃 𝑋 ≤ 4
(b) 𝑃 𝑋 > 5
(c) 𝑃 𝑋 ≤ 5
(d) 𝑃 𝑋 > 7
(e) 𝑃 𝑋 ≤ 2
Mean and Variance of a Discrete
Random Variable
The mean or expected value of the discrete random
variable X, denoted as μ or E(X), is
𝜇=𝐸 𝑋 =
𝑥𝑓 𝑥
𝑥
(3-3)
The variance of X, denoted as σ2 or V(X), is
𝜎2 = 𝑉 𝑋 = 𝐸 𝑋 − 𝜇
2
𝑥 − 𝜇 2𝑓 𝑥
=
𝑥
𝑥 2 𝑓 𝑥 − 𝜇2
=
𝑥
The standard deviation of X is 𝜎 = 𝜎 2 .
Mean and Variance of a Discrete
Random Variable
Examples:
3-11/76 Messages The number of messages sent per hour
over a computer network has the following distribution:
x = number of messages 10
11
12
f(x)
0.08 0.15 0.30
13
0.20
14
15
0.20 0.07
Determine the mean and standard deviation of the
number of messages sent per hour.
Mean and Variance of a Discrete
Random Variable
3-47/76 If the range of X is the set {1, 2, 3, 4, 5} and
𝑃 𝑋 = 𝑥 = 0.2, determine the mean and variance of the
random variable.
3-48/76 Determine the mean and variance of the random
variable in Exercise 3-14.
outcome
x
a
0
b
0
c
1.5
d
1.5
e
2
f
3
Mean and Variance of a Discrete
Random Variable
3-49/76 Determine the mean and variance of the random
variable in Exercise 3-15.
x
f(x)
─2
1/8
─1
2/8
0
2/8
1
2/8
2
1/8
3-50/76 Determine the mean and variance of the random
variable in Exercise 3-16.
𝑓 𝑥 = 8 7 1 2 𝑥 , 𝑥 = 1, 2, 3
Mean and Variance of a Discrete
Random Variable
3-51/76 Determine the mean and variance of the random
variable in Exercise 3-17.
2𝑥 + 1
𝑓 𝑥 =
, 𝑥 = 0, 1, 2, 3, 4
25
3-52/76 Determine the mean and variance of the random
variable in Exercise 3-18.
𝑓 𝑥 = 3 4 1 4 𝑥 , 𝑥 = 0, 1, 2, …
Mean and Variance of a Discrete
Random Variable
Expected Value of a Function of a Discrete Random
Variable
If X is a discrete random variable with probability mass
function 𝑓 𝑥 ,
𝐸ℎ 𝑋
=
ℎ 𝑥 𝑓 𝑥
𝑥
(3-4)
Mean and Variance of a Discrete
Random Variable
Examples:
4.17/118 Let 𝑋 be a random variable with the following
probability distribution:
𝑥
−3
6
9
𝑓 𝑥 1/6 1/2 1/3
Find 𝜇𝑔
𝑋
, where 𝑔 𝑋 = 2𝑋 + 1 2 .
4.18/118 Find the expected value of the random variable
𝑔 𝑋 = 𝑋 2 , where 𝑋 has the probability distribution of
Exercise 4.2.
𝑓 𝑥 =
3
𝑥
1
4
𝑥
3
4
3−𝑥
, 𝑥 = 0,1,2,3
Discrete Uniform Distribution
A random variable X has a discrete uniform distribution if
each of the n values in its range, say, 𝑥1 , 𝑥2 , … , 𝑥𝑛 , has
equal probability. Then,
𝑓 𝑥𝑖 = 1 𝑛
(3-5)
Mean and Variance
Suppose X is a discrete uniform random variable on the
consecutive integers a, a + 1, a + 2, …, b, for a ≤ b. Then
mean of X is
𝑏+𝑎
𝜇=𝐸 𝑋 =
2
Discrete Uniform Distribution
Mean and Variance
The variance of X is
𝑏−𝑎+1
2
𝜎 =
12
(3-6)
2
−1
Discrete Uniform Distribution
Discrete Uniform Distribution
Examples:
3-65/79 Let the random variable X have a discrete
uniform distribution on the integers 1 ≤ 𝑥 ≤ 5 .
Determine the mean and variance of X.
3-69/79
Assume
that
the
wavelengths
of
photosynthetically active radiations (PAR) are uniformly
distributed at integer nanometers in the red spectrum
from 657 to 700 nm.
(a) What is the mean and variance of the wavelength
Discrete Uniform Distribution
3-69/79
(b) If the wavelengths are uniformly distributed at integer
nanometers from 75 to 100 nanometers, how does the
mean and variance of the wavelength distribution
compare to the previous part? Explain.
Binomial Distribution
Consider the following random experiments and random
variables:
1. Flip a coin 10 times. Let X = number of heads
obtained.
2. A worn machine tool produces 1% defective parts. Let
X = number of defective parts in the next 25 parts
produced.
3. Each sample of air has a 10% chance of containing a
particular rare molecule. Let X = the number of air
samples that contain the rare molecule in the next 19
samples analyzed.
Binomial Distribution
4. Of all bits transmitted through a digital transmission
channel, 10% are received in error. Let X = the number
of bits in error in the next five bits transmitted.
5. A multiple-choice test contains 10 questions, each
with four choices, and you guess at each question. Let
X = the number of questions answered correctly.
6. In the next 20 births at a hospital, let X = the number
of female births.
7. Of all patients suffering a particular illness, 35%
experience improvement from a particular
medication. In the next 100 patients administered the
medication, let X = the number of patients who
experience improvement.
Binomial Distribution
• The terms success and failure are just labels. We can
just as well use A and B or 0 or 1. Unfortunately, the
usual labels can sometimes be misleading. In
experiment 2, because X counts defective parts, the
production of a defective part is called a success.
• Bernoulli trial has only two possible outcomes used so
frequently as a building block of a random experiment.
Binomial Distribution
A random experiment consists of n Bernoulli trials such
that
(1) The trials are independent.
(2) Each trial results in only two possible outcomes,
labeled as “success” and “failure”.
(3) The probability of a success in each trial, denoted as p,
remains constant.
Binomial Distribution
The random variable X that equals the number of trials
that result in a success has a binomial random variable
with parameters 0 < p < 1 and n = 1, 2, ... . The probability
mass function of X is
𝑛 𝑥
𝑓 𝑥 =
𝑝 1 − 𝑝 𝑛−𝑥 , 𝑥 = 0, 1, … , 𝑛
𝑥
(3-7)
Binomial Distribution
Mean and Variance
If X is a binomial random variable with parameters p and
n,
𝜇 = 𝐸 𝑋 = 𝑛𝑝
and
𝜎 2 = 𝑉 𝑋 = 𝑛𝑝 1 − 𝑝
(3-8)
Binomial Distribution
Binomial Distribution
Examples:
3-79/84 The random variable X has a binomial distribution
with n = 10 and p = 0.01. Determine the following
probabilities.
(a) 𝑃 𝑋 = 5
(b) 𝑃 𝑋 ≤ 3
(c) 𝑃 𝑋 ≥ 9
(d) 𝑃 3 ≤ 𝑋 < 5
3-81/84 Sketch the probability mass function of a
binomial distribution with n = 10 and p = 0.01 and
comment on the shape of the distribution.
(a) What value of X is most likely?
(b) What value of X is least likely?
Binomial Distribution
3-83/84 Determine the cumulative distribution function
of a binomial random variable with n = 5 and p = 1/4.
3-84/84 An electronic product contains 40 integrated
circuits. The probability that any integrated circuit is
defective is 0.02, and the integrated circuits are
independent. The product operates only if there are no
defective circuits. What is the probability that the product
operates?
Binomial Distribution
3-85/84 The phone lines to an airline reservation system
are occupied 50% of the time. Assume that the events
that the lines are occupied on successive calls are
independent. Assume that 10 calls are placed to the
airline.
(a) What is the probability that for exactly three calls the
lines are occupied?
(b) What is the probability that for at least one call the
lines are not occupied?
(c) What is the expected number of calls in which the lines
are all occupied?
Poisson Distribution
A widely-used distribution emerges as the number of
trials in a binomial experiment increases to infinity while
the mean of the distribution remains constant. Consider
the following example.
3-30/97 Consider the transmission of n bits over a digital
communication channel. Let the random variable X equal
the number of bits in error. When the probability that a
bit is in error is constant and the transmissions are
independent, X has a binomial distribution.
Poisson Distribution
Let p denote the probability that a bit is in error. Let λ =
pn. Then E(X) = pn = λ and
𝑥
𝑛−𝑥
𝑛 𝑥
𝑛 𝜆
𝜆
𝑥
𝑃 𝑋=𝑥 =
𝑝 1−𝑝 =
1−
𝑥
𝑥 𝑛
𝑛
Now, suppose that the number of bits transmitted
increases and the probability of an error decreases exactly
enough that pn remains equal to a constant. That is, n
increases and p decreases accordingly, such as E(X) = λ
remains constant.
Poisson Distribution
Then, with some work, it can be shown that
𝑛
𝑥
1 𝑥
𝑛
→
1
𝑥!
1
𝜆 −𝑥
−
𝑛
→1
1
𝜆 𝑛
−
𝑛
→ 𝑒 −𝜆
so that,
𝑒 −𝜆 𝜆𝑥
lim 𝑃 𝑋 = 𝑥 =
,
𝑛→∞
𝑥!
𝑥 = 0, 1, 2, …
Also, because the number of bits transmitted tends to
infinity, the number of errors can equal any nonnegative
integer. Therefore, the range of X is the integers from zero
to infinity.
Poisson Distribution
3-31/97 Wire Flaws Flaws occur at random along the
length of a thin copper wire. Let X denote the random
variable that counts the number of flaws in a length of L
millimeters of wire and suppose that the average number
of flaws in L in millimeters is λ.
For the probability distribution of X:
• Partition the length of wire into n subintervals of small
length, say, 1 micrometer each.
• Small subinterval results to negligible probability that
more than one flaw occurs for such subinterval.
• The probability of containing a flaw for a subinterval is
p.
Poisson Distribution
• We can model the distribution of X as approximately a
binomial random variable.
• We obtain p = λ/n from E(X) = λ = np.
• With enough subintervals, n is very large and p is very
small.
Poisson Distribution
Same reasoning can be applied to any interval, including
an interval of time, an area, or a volume. For example,
counts of (1) particles of contamination in semiconductor
manufacturing, (2) flaws in rolls of textiles, (3) calls to a
telephone exchange, (4) power outages, and (5) atomic
particles emitted from a specimen have been modeled by
the probability mass function in the following definition.
Poisson Distribution
In general, consider an interval T of real numbers
partitioned into subintervals of small length Δt and
assume that as Δt approaches zero,
(1) the probability that more than one event is a
subinterval tends to zero,
(2) the probability of one event in a subinterval tends to
λΔt/T,
(3) the event in each subinterval is independent of other
subintervals.
A random experiment with these properties is called
Poisson process,
Poisson Distribution
The random variable X that equals the number of events
in a Poisson process is a Poisson random variable with
parameter 0 < λ, and the probability mass function of X is
𝑒 −𝜆 𝜆𝑥
𝑓 𝑥 =
𝑥 = 0, 1, 2, …
𝑥!
(3-16)
Poisson Distribution
Poisson Distribution
Poisson Distribution
The sum of the probabilities is one because
∞
∞
−𝜆
𝑥
𝑥
𝑒 𝜆
𝜆
= 𝑒 −𝜆
𝑘!
𝑘!
𝑘=0
𝑘=0
and the summation on the right-hand side of the previous
equation is recognized to be Taylor’s expansion of ex
evaluated at λ. Therefore, the summation equals eλ and
the right-hand side equals e─λeλ = 1.
Poisson Distribution
Use consistent units
For example, if the
average number of flaws per millimeter of wire is 3.4, then the
average number of flaws in 10 millimeter of wire is 34, and the
average number of flaws in 100 millimeter of wire is 340.
Poisson Distribution
Mean and Variance
If X is a Poisson random variable with parameter λ, then
𝜇=𝐸 𝑋 =𝜆
and
𝜎2 = 𝑉 𝑋 = 𝜆
(3-17)
Poisson Distribution
Examples:
3-129/101 Suppose X has a Poisson distribution with a
mean of 4. Determine the following probabilities:
(a) 𝑃 𝑋 = 0
(b) 𝑃 𝑋 ≤ 2
(c) 𝑃 𝑋 = 4
(d) 𝑃 𝑋 = 8
Poisson Distribution
3-132/101 The number of telephone calls that arrive at a
phone exchange is often modeled as Poisson random
variable. Assume that on the average there are 8 calls per
hour.
(a) What is the probability that there are exactly five calls
in one hour?
(b) What is the probability that there are three or fewer
calls in one hour?
(c) What is the probability that there are exactly 15 calls in
two hours?
(d) What is the probability that there are exactly five calls
in 30 minutes?
Poisson Distribution
3-137/102 When a computer disk manufacturer tests a
disk, it writes to the disk and then tests it using a certifier.
The certifier counts the number of missing pulses or
errors. The number of errors on a test area on a disk has a
Poisson distribution with λ = 0.2.
(a) What is the expected number of errors per test area?
(b) What percentage of test areas have two or fewer
errors?
Poisson Distribution
3-141/102 The number of content changes to a Web site
follows a Poisson distribution with a mean of 0.25 per day.
(a) What is the probability of two or more changes in a
day?
(b) What is the probability of no content changes in five
days?
(c) What is the probability of two or fewer changes in five
days?
Summary
• Probability mass function provides probabilities for the
values in the range of a discrete random variable.
• The cumulative distribution function of a discrete
random variable X, denoted as 𝐹 𝑥 , is
𝐹 𝑥 =𝑃 𝑋≤𝑥 =
𝑓 𝑥𝑖
𝑥𝑖 ≤𝑥
• The mean refers to the expected value of a random
variable. For discrete case, 𝜇 = 𝐸 𝑋 = 𝑥 𝑥𝑓 𝑥 .
Summary
• The variance is a measure of variability defined as the
expected value of the square of the random variable
around its mean. For discrete case,
𝜎2 = 𝑉 𝑋 = 𝐸 𝑋 − 𝜇
2
𝑥 − 𝜇 2𝑓 𝑥
=
𝑥
𝑥 2 𝑓 𝑥 − 𝜇2 .
=
𝑥
Summary
• Discrete uniform random variable is a discrete random
variable with a finite range and constant probability
mass function
• Discrete uniform distribution
𝑓 𝑥𝑖 = 1 𝑛
𝑏+𝑎
𝜇=𝐸 𝑋 =
2
𝑏−𝑎+1
2
𝜎 =
12
2
−1
Summary
• Bernoulli trials are sequences of independent trials
with only two outcomes, generally called “success” and
“failure”, in which the probability of success remains
constant.
• Binomial distribution
𝑛 𝑥
𝑓 𝑥 =
𝑝 1 − 𝑝 𝑛−𝑥 , 𝑥 = 0, 1, … , 𝑛
𝑥
𝜇 = 𝐸 𝑋 = 𝑛𝑝
𝜎 2 = 𝑉 𝑋 = 𝑛𝑝 1 − 𝑝
Summary
• A Poisson process is a random experiment with events
that occur in an interval and satisfy the following
assumptions. The interval can be partitioned into
subintervals such that the probability of more than one
event in a subinterval is zero, the probability of an
event in a subinterval is proportional to the length of
the subinterval, and the event in each subinterval is
independent of other subintervals.
Summary
• Poisson distribution
𝑒 −𝜆 𝜆𝑥
𝑓 𝑥 =
𝑥!
𝑥 = 0, 1, 2, …
𝜇 = 𝐸 𝑋 = 𝑛𝑝
𝜎 2 = 𝑉 𝑋 = 𝑛𝑝 1 − 𝑝
References
• Montgomery and Runger. Applied Statistics and
Probability for Engineers, 5th Ed. © 2011
• Walpole, et al. Probability and Statistics for Engineers
and Scientists 9th Ed. © 2012, 2007, 2002
```