Chapter 2
Chapter 2
Probability Distributions
CHAPTER 2
Chapter Outline
1
Concept of a Random Variable
DD S
DN
ND
NN
0 1 2
2
Concept of a Random Variable
➢ A random variable is a function that assigns a real number to each outcome in the
sample space of a random experiment.
➢ Notation: " X " denotes the random variable .
" x " denotes a value of the random variable X.
➢ Types of Random Variables:
• A discrete random variable is a random variable with a finite (or countably
infinite) range.
• A continuous random variable is a random variable with an interval (either
finite or infinite) of real numbers for its range.
➢ In most practical problems:
• A discrete random variable represents count data, such as the number of
defectives in a sample of k items.
• A continuous random variable represents measured data, such as height, weights,
temperatures, distance, or life periods. 3
Concept of a Random Variable
4
Discrete Probability Distributions
5
Discrete Probability Distributions
➢ Example 1:
Verify that the following functions are probability mass functions, and determine the
requested probabilities:
a. P(X ≤ 2)
x -2 -1 0 1 2
b. P(X > -2) f(x)=P(X = x) 1/8 2/8 2/8 2/8 1/8
c. P(-1 ≤ X ≤ 1)
Solution:
• Each probability is between 0 and 1 - f(x ) ≥ 0
𝑓(𝑥) = 1
• The sum of the probabilities is equal 1 - 𝑥
-
a. P(X ≤ 2) = 1
b. P(X > -2) = 7/8
c. P(-1 ≤ X ≤ 1) = 6/8
6
Discrete Probability Distributions
➢ Example 2:
A shipment of 20 similar laptop computers to a retail outlet contains 3 that are
defective. If a school makes a random purchase of 2 of these computers, find the
probability distribution for the number of defectives.
Solution:
Let X be a random variable whose values x are the possible numbers of defective
computers purchased by the school. Then x can only take the numbers 0, 1, and 2
3 17 3 17
68 1 1 51
0 2 𝑓 1 =𝑃 𝑋=1 = =
𝑓 0 =𝑃 𝑋=0 = 20 = 20 190
95 2
2
3 17
2 0 3
𝑓 2 =𝑃 𝑋=2 = 20 =
190
2
The probability distribution of X can be given in the following table:
x 0 1 2
f(x)=P(X = x) 68/95 51/190 3/190
7
Discrete Probability Distributions
➢ Example 3:
Find the cumulative distribution function (CDF) of the random variable X with the
probability function: x 0 1 2 3 4
f(x) 1/16 1/4 3/8 1/4 1/16
Solution:
F(0) = f(0) = 1/16,
F(1) = f(0) + f(1) = 5/16,
F(2) = f(0) + f(1) + f(2) = 11/16,
F(3) = f(0) + f(1) + f(2) + f(3) = 15/16,
F(4) = f(0) + f(1) + f(2) + f(3) + f(4) = 1. 8
Discrete Probability Distributions
➢ Example-If we talk about The probability of selecting a person who is at least 163
centimeters but not more than 165 tall. Now we are dealing with an interval rather
➢ The definition of probability in the continuous case presumes for each random
variable the existence of a function, called a probability density function (pdf), such
that areas under the curve give the probabilities associated with the corresponding
10
Continuous Probability Distributions
➢ The probability that X assumes a value between a and b is equal to the shaded area
under the density function between the ordinates at x = a and x = b, and from integral
calculus is given by
𝑃 𝑎<𝑋<𝑏
𝑏
𝑃 𝑎 < 𝑋 < 𝑏 = 𝑥𝑑 𝑥 𝑓 𝑎.
➢ Example 4:
𝑥2
, −1 < 𝑥 < 2,
Suppose that 𝑓 𝑥 = ቐ3
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒.
∞ −1 2 ∞
න 𝑓(𝑥) 𝑑𝑥 = න 𝑓(𝑥) 𝑑𝑥 + න 𝑓(𝑥) 𝑑𝑥 + න 𝑓(𝑥) 𝑑𝑥
−∞ −∞ −1 2
2
2
𝑥2 𝑥3 (2)3 −1 3
8 1
න 𝑑𝑥 = = − = + =1
−1 3 9 9 9 9 9
-1
1 𝑥2 𝑥3 1 1 3 0 3 1 0 1
b. P (0 < X ≤ 1) = 0 3 𝑑𝑥 = = − = + =9
9 9 9 9 9
0 12
Continuous Probability Distributions
➢ Example 5:
The pdf of the random variable X is given by
𝑓 𝑥 = ቊ𝐶/ 𝑥, 0<𝑥<4
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Find:
a. the value of C,
b. P (X < 0.25) and (X > 1).
Solution:
∞ 0 4 ∞
a. −∞ 𝑓(𝑥) 𝑑𝑥 = −∞ 𝑓(𝑥) 𝑑𝑥 + 0 𝑓(𝑥) 𝑑𝑥 + 4 𝑓(𝑥) 𝑑𝑥
1
− 2 +1 4 4
𝑥
1 1
4 𝑐 4 −2 − +1
= 0 𝑑𝑥 = 0 𝑐𝑥 𝑑𝑥 = 𝑐 2 0 = 2c 𝑥 0 = 4c =1
𝑥
b) P (X < 0.25)
0.25
0.25 0.25 1 1 1 1
= −∞ 𝑓(𝑥) 𝑑𝑥 = 0 𝑑𝑥 = 42 𝑥 = ( 0.25 -0) = 4
4 𝑥 0 2
P (X > 1)
∞ 4 ∞ 4 1
= 1 𝑓(𝑥) 𝑑𝑥 =1 𝑓(𝑥) 𝑑𝑥 + 4 𝑓(𝑥) 𝑑𝑥= 1 𝑑𝑥 =
4 𝑥
4
1 1 1
= 2 𝑥 = (2 -1) = 2
4 2
1
14
Continuous Probability Distributions
➢ Result:
• P(a ≤ X ≤ b) = P(X ≤ b) − P(X ≤ a)= F (b) − F(a)
𝑑𝐹(𝑥)
• 𝑓 𝑥 = , if the derivative exists.
𝑑𝑥
15
Continuous Probability Distributions
➢ Example 6:
For the density function of Example 4 , find F(x). Use it to evaluate P(0 < X ≤ 1).
Solution:
x
𝑥 𝑥 𝑡2 𝑡3 𝑥 3 +1
F(x) = −∞ 𝑓 𝑡 𝑑𝑡 = −1 3 𝑑𝑡 =
9 -1
=
9
.
0, 𝑥 < −1,
𝑥3 + 1
𝐹 𝑥 = , −1 ≤ 𝑥 < 2,
9
1, 𝑥≥2
Using the CDF,
2 1 1
P(0 < X ≤ 1) = F(1) – F(0) = 9 − =9
9
16
Mean and Variance of a Random Variable
➢ Two numbers are often used to summarize a probability distribution for a random
variable X.
➢ The mean is a measure of the center or middle of the probability distribution, and is a
weighted average of the values of the random variable.
➢ The variance is a measure of the dispersion, or variability in distribution.
➢ Mean of a Random Variable:
• where x = the value of the random variable and f(x) = the probability corresponding
to a particular x value. 17
Mean and Variance of a Random Variable
➢ Example 7 :
A lot containing 7 components is sampled by a quality inspector; the lot contains 4 good
components and 3 defective components. A sample of 3 is taken by the inspector.Find
the expected value of the number of good components in this sample.
Solution
Let X represent the number of good components in the sample. The probability
distribution of X isThe probability distribution of X is
4 3
𝑥 3−𝑥
𝑓 𝑥 = 7 , 𝑥 = 0,1,2,3
3
Simple calculations yield f(0) = 1/35, f(1) = 12/35, f(2) = 18/35, and f(3) = 4/35.
Therefore,
1 12 18 4 12
μ=𝐸 𝑥 = 0 + 1 + 2 + 3 = = 1.7.
35 35 35 35 7
Thus, if a sample of size 3 is selected at random over and over again from a lot of 4 good
components and 3 defective components, it will contain, on average, 1.7 good components. 18
Mean and Variance of a Random Variable
➢ Example 8 :
Let X be the random variable that denotes the life in hours of a certain electronic
device. The probability density function is
20,000
𝑓 𝑥 = ቐ 𝑥3 , 𝑥 > 100,
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒.
Find the expected life of this type of device.
Solution:
∞ ∞ 20,000 ∞ 1
μ = E(𝑋) = −∞ 𝑥 𝑓(𝑥) 𝑑𝑥 = 100 𝑥 𝑑𝑥 = 20,000 100 𝑑𝑥 =
𝑥3 𝑥2
∞
1
20,000[- ] = 200 (hours).
𝑥
100
Therefore, we can expect this type of device to last, on average, 200 hours.
19
Mean and Variance of a Random Variable
σ = 𝜎2
20
Mean and Variance of a Random Variable
➢ Example 9:
Let X be a discrete random variable with the following probability distribution. Find
Var(X)
x 0 1 2 3
f(x) 0.51 0.38 0.10 0.01
Solution:
μ = σ3𝑥=0 𝑥 𝑓 𝑥 = (0)(0.51) + (1)(0.38) + (2)(0.10) + (3)(0.01) = 0.61.
𝜎 2 = E(X2 ) - μ2
= 𝑥 2 𝑓 𝑥 − 𝜇2
𝑥
➢ Example 10 :
Let X be a continuous random variable with the following pdf, Find the mean and the
variance of X.
𝜎 2 = E(X2 ) - μ2
2 5
μ = E(𝑋) = 2 1 𝑥 𝑥 − 1 𝑑𝑥 =
3
2 17
E(𝑋 2 ) = 2 1 𝑥 2 𝑥 − 1 𝑑𝑥 =
6
2
17 5 1
𝑉 𝑋 = 𝜎 2= 𝐸 𝑋 2 − 𝜇2 = − =
6 3 18
22
Mean and Variance of a Random Variable
➢ Example 10 :
Let X be a continuous random variable with the following pdf, Find the mean and the
variance of X.
𝜎 2 = E(X2 ) - μ2
2 5
μ = E(𝑋) = 2 1 𝑥 𝑥 − 1 𝑑𝑥 =
3
2 17
E(𝑋 2 ) = 2 1 𝑥 2 𝑥 − 1 𝑑𝑥 =
6
2
17 5 1
𝑉 𝑋 = 𝜎 2= 𝐸 𝑋 2 − 𝜇2 = − =
6 3 18
22