Professional Documents
Culture Documents
Chapter 4
Continuous Probability Distribution
Dr. OUYANG Ming
2022/2023 Term 1
1
Introduction
Discrete random variable: A random variable which takes
a discrete set of numeric values
3
Discrete Random Variables & Continuous Random Variables
Example: Let us first consider
the probability histogram below
for the shoe size of adult males.
Let 𝑋 represent these shoe sizes.
Thus, 𝑋 is a discrete random
variable, since shoe sizes can
only take whole number values.
6
Discrete Random Variables & Continuous Random Variables
Example: If we can measure shoe
sizes in smaller units, such as tenths,
or hundredths. As the number of
intervals increases, the width of the
bars becomes narrower and
narrower, and the graph approaches
a smooth curve.
7
Discrete Random Variables & Continuous Random Variables
Example: Now consider another
random variable 𝑋 = foot length of Probability Density Curve
adult males. Unlike shoe size, this
variable is not limited to distinct,
separate values, because foot
lengths can take any value over a
continuous range of possibilities.
Like the modified probability
histogram above, the total area
under the density curve equals 1,
and the curve represents
probabilities by area. 8
Discrete Random Variables & Continuous Random Variables
Example: Now consider another
random variable 𝑋 = foot length of Probability Density Curve
adult males. Unlike shoe size, this
variable is not limited to distinct,
separate values, because foot
lengths can take any value over a
continuous range of possibilities.
We would like to know 𝑃(10 < 𝑋 < 12),
the probability that a randomly chosen
male has a foot length anywhere between
10 and 12 inches, we’ll have to find the
area above our interval of interest
(10,12) and below our density curve. 9
Probability Density Function (pdf)
Probability density function (pdf) of
a continuous random variable 𝑿: Probability Density Curve
A curve such that the area under the
curve between any two points 𝑎 and Pr(a X b)
𝑏 is equal to the probability that the pdf 𝑓(𝑥)
random variable X falls between 𝑎
and 𝑏. [Similar role as the pmf]
10
Probability Density Function (pdf)
𝑏
Pr 𝑎 ≤ 𝑋 ≤ 𝑏 = න 𝑓 𝑥 𝑑𝑥 Probability Density Curve
𝑎
=Area Under the curve 𝑓(𝑥) Pr(a X b)
between 𝑎 and 𝑏 pdf 𝑓(𝑥)
Pr 𝑋 = 𝑎 = Pr 𝑎 ≤ 𝑋 ≤ 𝑎
𝑎
= න 𝑓 𝑥 𝑑𝑥 = 0
𝑎
Pr Ω = Pr −∞ ≤ 𝑋 ≤ ∞
∞
= න 𝑓 𝑥 𝑑𝑥 = 1
−∞ 11
Probability Density Function (pdf)
𝑏
Pr 𝑎 ≤ 𝑋 ≤ 𝑏 = න 𝑓 𝑥 𝑑𝑥 Probability Density Curve
𝑎
=Area Under the curve 𝑓(𝑥) Pr(a X b)
between 𝑎 and 𝑏 pdf 𝑓(𝑥)
𝐹 𝑥 = න 𝑓(𝑥) 𝑑𝑥
𝐹 𝑥 = න 𝑓(𝑥) 𝑑𝑥
𝐹 𝑥 ′ = 𝑓(𝑥)
14
Integral
The operation of integration,
up to an additive constant, is
the inverse of the operation
of differentiation.
𝐹 𝑥 = න 𝑓(𝑥) 𝑑𝑥
0≤𝐹 𝑥 ≤1 f(x)
17
Expected Value and Variance (Not required)
Expected Value of a continuous random variable 𝑋:
∞
𝜇 = 𝐸 𝑋 = න 𝑥𝑓 𝑥 𝑑𝑥
−∞
Variance of a continuous random variable 𝑋:
∞ ∞
𝜎 2 = 𝑉𝑎𝑟 𝑋 = න 𝑥 − 𝜇 2 𝑓 𝑥 𝑑𝑥 = න 𝑥 2 𝑓 𝑥 𝑑𝑥 − 𝜇2
−∞ −∞
21
Uniform Distribution
Example: Buses arrive at a specified bus stop at 15-minute intervals starting from 7:00
a.m. That is they arrive at 7:00, 7:15, 7:30,... If a passenger arrives at the stop at a time
that is uniformly distributed between 7:00a.m. and 7:30a.m., find the probability that
he has to wait more than 10 minutes for a bus.
22
Section 4.2
Normal Distribution
23
Introduction
𝑋~𝑁𝑜𝑟𝑚𝑎𝑙(𝜇, 𝜎 2 )
The normal distribution (also known as the
𝜇 (population mean)
Gaussian distribution) is a very common
𝜎 2 (population variance)
continuous probability distribution. Normal
distributions are important in statistics and
are often used in the natural and social
sciences to represent real-valued random
variables whose distributions are not known.
Probability Density Function (pdf):
1 1
− 2 𝑥−𝜇 2
𝑓 𝑥 = 𝑒 2𝜎
2𝜋𝜎
For −∞ < 𝑥 < ∞ 24
Introduction
𝑋~𝑁𝑜𝑟𝑚𝑎𝑙(𝜇, 𝜎 2 )
Example: When 𝜇 = 2 and 𝜎 = 2 then 𝜇 (population mean)
calculate 𝑓 𝑥 𝜎 2 (population variance)
1 1
− 2 1−2 2
𝑓 1 = 𝑒 2∗2
2𝜋 ∗ 2
1 1
−8
= 𝑒 = 0.1760
2 2 ∗ 3.14159
Probability Density Function (pdf):
1 1
− 2 𝑥−𝜇 2
𝑓 𝑥 = 𝑒 2𝜎
2𝜋𝜎
For −∞ < 𝑥 < ∞ 25
Shape of the Normal Distribution
𝑋~𝑁𝑜𝑟𝑚𝑎𝑙(𝜇, 𝜎 2 )
𝜇 (population mean)
𝜎 2 (population variance)
𝑓(𝑥)
Pdf of 𝑵𝒐𝒓𝒎𝒂𝒍(𝝁, 𝝈𝟐 ) is
(i) bell-shaped curve
1
2𝜋𝜎
(ii)unimodal
(iii)Symmetric
[Mean = Median = Mode]
• The normal distribution cannot model
skewed distributions.
• Half of the population is less than the mean
x
𝜇−𝑎 +a and half is greater than the mean
26
Shape of the Normal Distribution
Proof:
1. 𝑓(𝑥) achieves its maximum value at the mean value 𝜇:
1 1 1
𝑓(𝑥) 𝑓 𝑥 =
− 2 𝑥−𝜇 2
𝑒 2𝜎 ≤
2𝜋𝜎 2𝜋𝜎
1 2. The pdf is symmetric at 𝑥 = 𝜇: For any value 𝑎,
2𝜋𝜎 1 1 1 1
− 2 𝜇+𝑎−𝜇 2 − 2 𝑎 2
𝑓 𝜇+𝑎 = 𝑒 2𝜎 = 𝑒 2𝜎
2𝜋𝜎 2𝜋𝜎
1 1 1 1
− 2 𝜇−𝑎−𝜇 2 − 𝑎 2
𝑓 𝜇−𝑎 = 𝑒 2𝜎 = 𝑒 2𝜎2 = 𝑓(𝜇 + 𝑎)
2𝜋𝜎 2𝜋𝜎
28
Standard Normal Distribution
The standard normal distribution 𝑁(0,1) is a normal probability distribution with
𝜇 = 0 and 𝜎 2 = 1, [Special Case/Extremely Important]
Probability density function (pdf) of 𝑁(0,1): −∞ < 𝑧 < ∞
1 1 1 1
− 2 𝑥−𝜇 2 − 𝑥2
𝑓 𝑥 = 𝑒 2𝜎 = 𝑒 2
2𝜋𝜎 2𝜋
29
Cumulative Distribution Function of 𝑵(𝟎, 𝟏)
Notation for the cdf of 𝑁 0,1 : Φ 𝑧 = 𝐹 𝑧 = Pr(𝑍 ≤ 𝑧)
No closed form
32
Cumulative Distribution Function of 𝑵(𝟎, 𝟏)
33
Cumulative Distribution Function of 𝑵(𝟎, 𝟏)
34
Cumulative Distribution Function of 𝑵(𝟎, 𝟏)
35
Cumulative Distribution Function of 𝑵(𝟎, 𝟏)
Example: Please double-check the values below by yourself based on the normal table.
Φ 0 = Pr 𝑍 ≤ 0 = 0.5
Symmetric around 0
Φ 0.13 = Pr 𝑍 ≤ 0.13 = 0.5517
Φ 1.96 = Pr 𝑍 ≤ 1.96 = 0.9750
Φ 3.90 = Pr 𝑍 ≤ 3.90 = 1.0000
Φ 1.645 = 0.9500 Between Φ(1.64) and Φ(1.65)
=
𝑧𝑝/100 percentile
𝑝/100
𝑧0.5 = 0, Φ 0 = Pr 𝑍 ≤ 0 = 0.5
𝑧0.95 = 1.645, Φ 1.645 = 0.9500
𝑧0.975 = 1.96,
Key Percentiles
Φ 1.96 = Pr 𝑍 ≤ 1.96 = 0.9750
𝑧0.025 = −1.96, Φ −1.96 = Pr 𝑍 > 1.96 = 0.025 38
Empirical properties of 𝑵(𝟎, 𝟏)
𝑎−𝜇 𝑏−𝜇
Pr 𝑎 ≤ 𝑋 ≤ 𝑏 = Pr ≤𝑍≤
𝜎 𝜎
𝑏−𝜇 𝑎−𝜇
=Φ −Φ
𝜎 𝜎
41
Section 4.3
Normal Approximation to Binomial Distribution
42
Normal Approximation to Binomial
Suppose 𝑋~𝐵𝑖𝑛𝑜𝑚𝑖𝑎𝑙(𝑛, 𝑝)
When 𝑛 is large enough, pmf Pr(𝑋 = 𝑥) can
be well-approximated by the pdf of a normal
distribution:
𝑌~𝑁(𝜇, 𝜎 2 ), where 𝜇 = 𝑛𝑝, 𝜎 2 = 𝑛𝑝(1 − 𝑝)
Chart on the right:
Bars (in brown):
𝑋 ~𝐵𝑖𝑛𝑜𝑚𝑖𝑎𝑙 (20,0.25)
Curve (in blue):
𝑌 ~ 𝑁(5,3.75)
43
Normal Approximation to Binomial
Question: Can we always find a normal distribution to approximate the
𝑋~𝐵𝑖𝑛𝑜𝑚𝑖𝑎𝑙 (𝑛, 𝑝) well?
Answer: No. When (1) n is too small and (2) p is either too large or too small,
we would not be able to find a normal distribution to approximate 𝑋 well.
Small n: The bars in the pmf are p too large/small: Binomial distribution
not smooth enough would be extremely left/right-skewed
45
Marginal Cases
46
Normal Approximation to the Poisson Distribution
The normal distribution can also be used to approximate the Poisson
distribution. The motivation for this is that the Poisson distribution is
cumbersome to use for large values of 𝜇
47
Marginal Cases
48
Continuity Correction
Binomial/Poisson distribution is a discrete distribution, while Normal is a
continuous distribution.[Need to take care of the continuity issue]
Continuity Correction:
Pr(𝑋 = 𝑎) ≈ Pr(𝑎 − 0.5 ≤ 𝑌 ≤ 𝑎 + 0.5)
Lower Boundary
Pr(𝑋 = 0) ≈ Pr(𝑌 ≤ 0.5)
Upper Boundary (Binomial distribution)
Pr(𝑋 = 𝑛) ≈ Pr(𝑌 ≥ 𝑛 − 0.5)
50
Continuity Correction
Example: Consider 𝑋~𝐵𝑖𝑛𝑜𝑚𝑖𝑎𝑙(8, 0.45) approximated
by 𝑌~𝑁(𝑛𝑝, 𝑛𝑝𝑞) = 𝑁(3.6,1.98). Pr 𝑋 = 2 = Pr(1.5 ≤ 𝑋 ≤ 2.5)
Continuity Correction:
Pr 𝑎 ≤ 𝑋 ≤ 𝑏
≈ Pr(𝑎 − 0.5 ≤ 𝑌 ≤ 𝑏 + 0.5)
Pr 𝑋 ≥ 𝑎
≈ Pr(𝑌 ≥ 𝑎 − 0.5)
Pr 𝑋 ≤ 𝑏
≈ Pr(𝑌 ≤ 𝑏 + 0.5)
51
Example: A company produces dialysis filters (透析過濾器). On average,
10% are defective (缺陷) and will not pass inspection. What is the
probability that at least 15% of a sample of 100 filters are defective?
53