Lecture11 (Week 12) Updated
Lecture11 (Week 12) Updated
Email: guofeng.zhang@polyu.edu.hk
Office: TU832
Telephone: 2766 6936
Student Consultation Hours: Tue. 13:00–15:00
1 / 34
A brief review of the last lecture
Compute mean and variance according to the probability
distribution table:
X
µ = E[X] , ufX (u)
u
X X
2 2
σ = Var(X) , (u − µ) fX (u) = u2 fX (u) − µ2 ,
u u
3 / 34
§11.2 Continuous Random Variables
There are many random variables taking continuous values (namely real
numbers), like
• the life length of a light bulb
• time taken to finish an assignment
• the length of a person’s sleep in a certain night
First, let us visualize this notion by means of a graph on the next page.
4 / 34
density function f (x)
Area = P (a ≤ X ≤ b)
y Rb
= a f (x)dx
a b x
A typical probability density function
6 / 34
Definition 2 (mean and variance of a continuous random variable)
Let X be a continuous random variable with probability density
function f (x). The mean of X is defined as
Z ∞
µ = E[X] , xf (x)dx,
−∞
Remark. Using the above definition to compute E[X] and Var(X) for a
continuous random variable X is NOT required in this course.
7 / 34
Definition 3 (Standard Deviation)
Let X be a random variable (either discrete or continuous). The
standard deviation of X is the nonnegative square root of Var(X).
p
σ = Var(X) ≥ 0.
8 / 34
§11.2.1 Normal Distributions
9 / 34
§11.2.1 Normal Distributions
(x − µ)2
1
f (x) = √ exp − , −∞ < x < ∞
2πσ 2 2σ 2
E[X] = µ, Var(X) = σ 2 .
10 / 34
Facts
Example 1
Suppose X ∼ N (2, 32 ). Find E[−3X] and Var(−3X).
11 / 34
The Standard Normal Distribution
Definition 5 (The Standard Normal Distribution)
The normal distribution N (0, 1) (i.e., with mean 0 and variance 1) is
called the standard normal distribution.
Motivation:
Standardization
X −µ
X ∼ N (µ, σ 2 ) ⇐⇒ Z := ∼ N (0, 1) (2)
σ
13 / 34
Properties of the standard normal distribution.
(1) Total probability is 1:
P (−∞ ≤ Z ≤ ∞) = 1
(2) From item (1) above, we have
P (Z ≤ a) = 1 − P (Z ≥ a) (3)
(3) As the standard normal distribution is symmetric about
the y-axis, we have
P (Z ≤ 0) = P (Z ≥ 0) = 0.5
(4) According to item (3) above, if P (X ≤ a) < 0.5, then
a < 0. And moreover,
P (Z ≤ a) = P (Z ≥ −a) for all a ≤ 0 (4)
(6) From items (3) and (4) above, if P (Z ≥ b) > 0.5, then
b < 0. And moreover,
P (Z ≥ b) = 1 − P (Z ≥ −b), for all b ≤ 0 (5)
14 / 34
Remark. You might have seen other tables of the standard normal
distribution. But in this course, we will always use the above one!
Example 2
Let Z ∼ N (0, 1). Find P (Z > 0.36).
Solution.
P (Z > 0.36) = P (Z ≥ 0.36) = 0.3594. 15 / 34
Example 3
Let Z ∼ N (0, 1). Find P (Z < −0.36), P (Z < 0.3574) and
P (Z > 5).
The table of standard normal distribution usually only covers [0, 4] with
limited precision. One should use some rounding and algebra to find the
probabilities which are not covered.
Solutions.
P (Z < −0.36) = P (Z > 0.36) = 0.3594, since the standard
normal distribution is symmetric with respect to the origin.
P (Z < 0.3574) = 1 − P (Z ≥ 0.3574) ≈ 1 − P (Z ≥ 0.36) =
0.6406.
Since P (Z > 3.99) = 0.0000 (rounded to 4 digits) already, we
have P (Z > 5) > P (X > 3.99) = 0.0000.
16 / 34
Example 4
Suppose Z ∼ N (0, 1). Find (a). P (0 ≤ Z ≤ 2.32); (b).
P (−1.54 ≤ Z ≤ 0); (c). P (−1.54 ≤ Z ≤ 2.32).
Solutions. (a).
P (0 ≤ Z ≤ 2.32) = 0.5 − P (Z ≥ 2.32) = 0.5 − 0.0102 = 0.4898.
(b). P (−1.54 ≤ Z ≤ 0) = P (0 ≤ Z ≤ 1.54) = 0.5 − P (Z >
1.54) = 0.4382.
(c). P (−1.54 ≤ Z ≤ 2.32) = P (−1.54 ≤ Z ≤ 0) + P (0 ≤ Z ≤
2.32) = 0.9280.
17 / 34
Example. Suppose Z ∼ N (0, 1). Find
1. P (Z < 0.92) 3. P (Z < −1.62) 5. P (−2.19 ≤ Z ≤ 0) 7. P (−0.58 < Z < 1.36)
2. P (Z > 2.48) 4. P (0 ≤ Z ≤ 1.84) 6. P (0.21 < Z < 0.95) 8. P (Z > −2.52)
Solutions.
1. P (Z < 0.92) = 1 − P (Z > 0.92) = 1 − 0.1788 = 0.8212.
2. P (Z > 2.48) = 0.00657.
3. P (Z < −1.62) = P (Z > 1.62) = 0.0526.
4. P (0 ≤ Z ≤ 1.84) = 0.5 − P (Z ≥ 1.84) = 0.5 − 0.0329 = 0.4671.
5. P (−2.19 ≤ Z ≤ 0) = 0.5 − P (Z ≥ 2.19) = 0.5 − 0.0143 = 0.4857.
6. P (0.21 < Z < 0.95) = P (Z > 0.21) − P (Z > 0.95) =
0.4168 − 0.1711 = 0.2457.
7. P (−0.58 < Z < 1.36) = 1 − P (Z > 0.58) − P (Z > 1.36) =
1 − 0.2810 − 0.0869 = 0.6321.
8. P (Z > −2.52) = 0.5+[0.5−P (Z > 2.52)] = 1−0.00587 = 0.99413.
18 / 34
Example 5
Let Z ∼ N (0, 1). Find a and b so that P (Z ≤ a) = 0.33 and
P (Z ≥ b) = 0.99.
Solutions.
As P (Z ≤ a) = 0.33 < 0.5, we have a < 0 (Please refer to Equation
(4).). Then P (Z ≤ a) = P (Z ≥ −a). From the table of standard
normal distribution we see −a = 0.44, so a = −0.44.
As P (Z ≥ b) = 0.99 > 0.5, we know that b < 0 (Please refer to
Equation (5).). Then P (Z ≥ b) = 1 − P (Z ≥ −b) = 0.99, that is,
P (Z ≥ −b) = 0.01, From the table of standard normal distribution we
see −b = 2.33, so b = −2.33.
19 / 34
Standardizing a normal random variable
Fact
X−µ
Recall that if X ∼ N (µ, σ 2 ), then Z = σ ∼ N (0, 1).
Example 6
Let X be a continuous random variable that is normally distributed
with a mean of 25 and a standard deviation of 4. Find the area between
X = 18 and X = 34.
Solution.
X ∼ N (25, 42 ). Let Z = X−25
4 . Then Z ∼ N (0, 1).
18 − 25 X − 25 34 − 25
P (18 ≤ X ≤ 34) = P ≤ ≤
4 4 4
= P (−1.75 ≤ Z ≤ 2.25) = 1 − P (Z ≥ 2.25) − P (Z ≥ 1.75)
= 0.9477.
20 / 34
Example 7
Suppose that X has a normal distribution such that P (X < 116) = 0.2
and P (X < 328) = 0.9. Determine the mean and variance of X.
Solution.
Let X be the life length of a calculator. Then X ∼ N (54, 7.652 ).
Let Z = X−547.65 . Then Z ∼ N (0, 1).
Let a be the warranty period. Then P (0 ≤ X ≤ a) = 0.01, so
P ( 0−54 X−54 a−54 a−54
7.64 ≤ 7.65 ≤ 7.65 ) = P (−7.05882 ≤ Z ≤ 7.65 ) =
54−a a−54
P (Z ≥ 7.65 ) − P (Z ≥ 7.05882) = P (Z ≥ 7.65 ) = 0.01.
We check table to find that P (Z ≥ 2.33) = 0.01. Therefore
54 − a
2.33 = ⇒ a = 36.1755.
7.65
22 / 34
Normal distribution approximating Binomial distribution
Motivating Example
Let X ∼ Binomial(n, p) with n = 10, 000 and p = 0.4. Find
P (3000 ≤ X ≤ 3900).
23 / 34
Recall the animation of Binomial(80, p). (play it.)
Binomial(80,0) Binomial(80,0.3)
1.0
1.0
●
0.8
0.8
0.6
0.6
probability
probability
0.4
0.4
0.2
0.2
●●●●●
● ●
● ●
● ●
● ●●●
0.0
0.0
●
●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ●●●●●●●●●●●●●●●●● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
0 20 40 60 80 0 20 40 60 80
k k
Binomial(80,0.6) Binomial(80,0.99)
1.0
1.0
0.8
0.8
0.6
0.6
probability
probability
●
0.4
0.4
●
0.2
0.2 ●
●●●
●●● ●
●
● ●
● ●● ●
●●
0.0
0.0
●● ●●●●●●●●●●●●●●●●●●●●●●●●●
●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
0 20 40 60 80 0 20 40 60 80
k k
●
●
●
●
●
0.08
●
0.06
●
●
0.04
●
●
● ●
0.02
● ●
●
●
●
●
●
0.00
● ●●
●●●●●●●●●●●●● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
0 20 40 60 80
25 / 34
Normal distribution approximating Binomial distribution
Fact
Let X ∼ Binomial(n, p) with n very large such that np > 5 and
n(1 − p) > 5. Then X can be approximated by a normal random
variable Y ∼ N (np, np(1 − p)).
Remark:
Recall that in this case E[X] = np and Var(X) = np(1 − p).
np(1 − p) is the variance; and np(1 − p) is the standard
p
deviation.
26 / 34
Normal distribution approximating Binomial distribution
µ = np and σ 2 = np (1 − p)
Solutions.
We have np = 4000 > 5 and n(1 − p) = 6000 > 5, so we use
Y ∼ N (np, np(1 − p)) = N (4000, 2400) to approximate X.
Y√−4000
Let Z = 2400
, then approximately Z ∼ N (0, 1).
28 / 34
Example 9
Let X ∼ Binomial(n, p) with n = 100 and p = 0.4. Find
P (30 ≤ X < 39).
Solutions.
We have np = 40 > 5 and n(1 − p) = 60 > 5, so approximately
Y ∼ N (40, 24).
Y√−40
Let Z = 24
, then approximately Z ∼ N (0, 1).
29 / 34
Example 10 (Q4(c), Semester 1, 2017/2018)
A large electronic office product contains 1000 electronic components.
Assume that the probability that each component operates without
failure during the useful lift of the product is 0.995, and assume that the
components fail independently. Approximate the probability that 8 or
more of the original 1000 components fail during the useful life of the
product.
32 / 34
Example 12 (Q4, Semester 1, 2018/2019)
There are, on average, 120 students entering the university every hour.
The university has only two gates, an east gate and a south gate. Every
student has 60% probability to enter the university through the east
gate. Assume students enter the university independently.
(a) On average, how many students enter the university from
8:00 to 8:05? What is the probability that at least 5
students enter the university from 8:00 to 8:05?
(b) If there are 10 students entering the university from 8:05
to 8:10, what is the probability that over 5 student enter
through the south gate from 8:05 to 8:10?
(c) If there are 180 students entering the university from
8:30 to 9:00, use the normal distribution to estimate the
probability that less than or equal to 100 students enter
through the east gate from 8:30 to 9:00.
33 / 34
Solution.
(a) as there are, on average, 120 students entering the university every
hour, on average, 120 ∗ 60 5
= 10 students enter the university from 8:00
to 8:05. Let X be the number of students entering the university from
8:00 to 8:05. ThenP X ∼ Poisson(10). We have
P (X ≥ 5) = 1 − 4k=0 P (X = k) =
1 2 3 4
1 − e−10 (1 + 101! + 102! + 103! + 104! ) = 0.9708.
(b) Let Y be the number of students entering the university through the
south gate from
P8:05 to 8:10. Then Y ∼ Binomial(10, 0.4). Then
10 10
P (Y > 5) = k=6 6 ∗ 0.4k ∗ 0.610−k = 0.1662.
34 / 34