STAT451 - Chap 04
STAT451 - Chap 04
1 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Outline
2 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
3 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
4 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
0.4
0.3
f(x)
0.2
0.1
0.0
−4 −2 0 2 4
x
5 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
6 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
0.75
f(x)
0.50
0.25
0.00
−1 0 1
x
7 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
0.5
0.4
0.3
f(x)
0.2
0.1
0.0
−4 −2 0 2 4
x
8 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
9 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
1.00
We calculate: 0.75
0 if x < −1
F(x)
0.50
x +1
F (x ) = if − 1 ≤ x ≤ 1;
2
1 if x > 1. 0.25
0.00
−1 0 1
x
10 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
1.00
0.75
We have
Zx
F(x)
1 s2 0.50
F (x ) = √ exp − ds
2π 2
−∞ 0.25
0.00
−4 −2 0 2 4
x
11 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
0.5
0.4
0.3
f(x)
0.2
P(X ≤ a)
0.1
0.0
−4 −2 a 0 2 4
and computed as
Za
P(X ≤ a) = f (x ) dx = F (a)
−∞
12 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
0.5
0.4
0.3 P(X ≥ a)
f(x)
0.2
0.1
0.0
−4 −2 a 0 2 4
x
and computed as
Z∞
P(X ≥ a) = f (x ) dx = 1 − P(X ≤ a) = 1 − F (a)
a
13 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
0.5
0.4
0.3 P(a ≤ X ≤ b)
f(x)
0.2
0.1
0.0
−4 −2 a 0 b 2 4
x
and computed as
Zb
P(a ≤ X ≤ b) = f (x ) dx = P(X ≤ b) − P(X ≤ a) = F (b) − F (a)
a
14 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
similarly,
P(a < X < b) = P(a ≤ X ≤ b).
Exercise 1: Let X be a continuous random variable representing the measured
current intensity in a thin copper wire, in milliamperes. Assume that the range
of X is [0, 20mA] and that its probability density function is:
0.05 if 0 ≤ x ≤ 20;
f (x ) =
0 if x < 0 or x > 20.
Answers: (b) 0.368; (c) 0.286; (d) 0; (e) 0.982; (f) 0.05; (g) 2.303; (h) 0.095
Exercise 3: Consider a continuous random variable X with pdf as
f (x ) = 0.5 cos(x ) if −π/2 < x < π/2, otherwise f (x ) = 0. Determine:
Answers: (b) 0.5; (c) 0.146; (d) 0.707; (d) 0.854; (f) 1.120
16 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Exercise 4: Consider the density curve shown in the figure, representing the
distribution of diameters (measured 4.5 feet above the ground) in a population
of 30-year-old Douglas fir trees. The areas under the curve are shown in the
figure. What is the probability that a tree has a diameter:
(a) between 4 inches and 10 inches?
(b) less than 4 inches?
(c) more than 6 inches?
18 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
20 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Some Properties
Here are some important properties of the expected value and variance that
should be remembered:
E(c) = c, for c is a constant.
E(cX + b) = cE(X ) + b, for c and b are constants.
Given two RVs X and Y , we have
21 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Some Properties
and
Var(h(X )) = E(h(X )2 ) − E(h(X ))2 .
Given two RVs X and Y , if X and Y are independent, then
22 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
23 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Exponential distribution
Exponential distribution
A continuous random variable X is
called to follow an exponential 2.0
f(x)
−λx
f (x ) = λe , 1.0
0.5
Exponential distribution
Answers: (b) 0; (c) 0.0183; (d) 0.865; (e) 0.117; (f) 0.026
Exercise 9: Consider a random variable X that follows an exponential
distribution with a mean of 10. Determine:
Answers: (b) 0.368; (c) 0.135; (d) 0.950; (e) 0.141; (f) 23.026
25 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Let Y represent the number of times an event occurs within a time interval t,
then,
Y ∼ P(tλ),
i.e., Y follows a Poisson distribution with parameter tλ.
26 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Example 4: A home appliance company records that the time between two
consecutive warranty claims for their products follows an exponential
distribution with a mean of 1.5 days (1 day = 24 hours).
Let X be the “time between two consecutive warranty claims.” Therefore,
X ∼ Exp(λ).
1 1
According to the description, we have E(X ) = = , which implies
λ 1.5
λ = 0.667
Let Y be the “number of warranty claims received within 5 hours”. Then,
5
Y ∼ P 0.667 ×
24
or Y ∼ P(0.139).
In this example, the time frame T is in days, while t is 5 hours. Therefore, we
need to convert t into days.
27 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Exercise 10: A home appliance company records that the time between two
consecutive warranty claims for their products follows an exponential
distribution with a mean of 1.5 days (1 day = 24 hours).
(a) Calculate the probability that no warranty claims are received by the
company within 5 hours.
(b) Calculate the probability that the company receives at least 2 warranty
claims within 5 hours.
(c) A random day is selected for observation. Given that the company
received more than 1 warranty claim on that day, calculate the probability
that no more than 3 warranty claims were received on that day.
28 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Normal Distribution
where −∞ < x < +∞, and the two parameters −∞ < µ < +∞, and σ > 0.
For example, given µ = 0 and σ 2 = 1, the pdf is shown as follows:
0.5
µ=0
0.4 σ2 = 1
0.3
f(x)
0.2
0.1
0.0
−4 −2 0 2 4
x
29 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Normal Distribution
E(X ) = µ, Var(X ) = σ 2
30 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Normal Distribution
31 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Normal Distribution
32 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
0.5
P(X ≤ 1.04) = Φ(1.04) z 0.00 0.01 0.02 0.03 0.04
0.4
0.0 0.5000 0.5040 0.5080 0.5120 0.5160
0.3 0.1 0.5398 0.5438 0.5478 0.5517 0.5557
f(x)
. . . . . .
. . . . . .
0.2 . . . . . .
1.0 0.8413 0.8438 0.8461 0.8485 0.8508
0.1 . . . . . .
. . . . . .
. . . . . .
0.0
−4 −2 0 1.04 2 4
33 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Solutions:
(a) P(Z > 1.26) = 1 − P(Z ≤ 1.26) = 1 − Φ(1.26) = 1 − 0.8962 = 0.1038;
(b) P(Z < −0.86) = 1 − Φ(0.86) = 1 − 0.8051 = 0.1949;
(c) P(Z > −1.37) = 1 − P(Z < −1.37) = 1 − (1 − Φ(1.37)) = Φ(1.37) =
0.9147;
(d) P(−1.25 < Z < 0.37) = Φ(0.37) − Φ(−1.25) = Φ(0.37) − 1 + Φ(1.25) =
0.5387
34 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Exercise 13: Using Table A.3, find the value of z such that:
35 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
X − 10 12 − 10 12 − 10
(a) P(X ≤ 12) = P ≤ =P Z ≤ = Φ(1) =
2 2 2
0.8413.
11 − 10 9 − 11
(b) P(9 < X < 11) = Φ −Φ = Φ(0.5) − Φ(−0.5) =
2 2
Φ(0.5) − 1 + Φ(0.5) = 0.3830.
(c) Using standardized normal transformation, we have
x − 10
P(X < x ) = Φ = 0.98
2
By using Table A.3 Φ(z), we obtain Φ(2.05) = 0.9798 ≈ 0.98, therefore
x − 10
= 2.05
2
It implies x = 2 × 2.05 + 10 = 14.1
37 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
38 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Exercise 16: (Laptop Battery Life)The time until a laptop battery needs
recharging follows a normal distribution with mean 260 minutes and standard
deviation 50 minutes.
(a) What is the probability that a battery lasts more than 4 hours?
(b) Find the 1st quartile and 3rd quartile of battery life. (x is the 1st quartile
if P(X ≤ x ) = 0.25; x x is the 3rd quartile if P(X ≤ x ) = 0.75.)
(c) What battery life (in minutes) has a greater than 95% probability?
Answers: (a) 0.6554; (b) 226.276 và 293.725; (c) 342.243
39 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Uniform distribution
40 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Uniform distribution
41 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
t-distribution
42 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
t-distribution
0.4
0.3
Standard normal distribution
0.2
0.1
t−distribution, df = 5 t−distribution, df = 1
0.0
−4 −2 0 2 4
43 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Chi-square χ2 distribution
The distribution for a random variable that has positive value (greater
than or equal to 0).
The Chi-square distributions are right-skewed.
The Chi-square distribution is a family of curves, each determined by the
degrees of freedom.
The Chi-square distribution is denoted by χ2n , with n as degree of freedom.
The area under each curve of the chi-square distribution equals 1.
Assumption that we have k random variable X1 , X2 , . . . , Xk , such as
Xi ∼ N (0, 1) with i = 1, 2, . . . , k. Then, Xi2 ∼ χ21 and
Y = X12 + X22 + . . . + Xk2 ∼ χ2k .
44 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Chi-square χ2 distribution
0.5
0.4
0.3
Chi−square distribution, df = 2
0.2
Chi−square distribution, df = 5
Chi−square distribution, df = 10
0.1
0.0
0 5 10 15 20
45 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
46 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
47 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
48 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Based on this result, we can use the normal distribution to approximate the
probability of a binomial variable. Specifically:
!
X − np x + 0.5 − np
P(X ≤ x ) = P(X ≤ x + 0.5) = P p ≤ p
np(1 − p) np(1 − p)
!
x + 0.5 − np
≈ Φ p
np(1 − p)
and
!
X − np x − 0.5 − np
P(X < x ) = P(X ≤ x − 0.5) = P p ≤ p
np(1 − p) np(1 − p)
!
x − 0.5 − np
≈ Φ p
np(1 − p)
49 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
50 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
The results show that when n is large enough, using normal approximation
simplifies probability calculations compared to the exact binomial probability
formula.
51 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
52 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
53 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
Based on this result, we can use the normal distribution to approximate the
probability of a Poisson variable. Specifically:
X −λ x + 0.5 − λ
P(X ≤ x ) = P(X ≤ x + 0.5) = P √ ≤ √
λ λ
x + 0.5 − λ
≈ Φ √
λ
and
X −λ x − 0.5 − λ
P(X < x ) = P(X ≤ x − 0.5) = P √ ≤ √
λ λ
x − 0.5 − λ
≈ Φ √
λ
54 / 56
Continuous Random Variables Expected value and Variance Some continuous distributions The approximate distribution
56 / 56