2 - 1 - 05 Continuous Random Variables Annotated
2 - 1 - 05 Continuous Random Variables Annotated
II
2.1 Probability Calculus
30063 BIEM Class 16
Lesson 5 D Fein
A.Y. 2023-2024
• Continuous random
variables
• Notable continuous
distributions
• Continuous uniform
• Exponential
• Normal https://forms.gle/8j4ePgCHgCVx6nU19
Continuous random variables: everywhere!
There are many situations that can be represented using continuous
random variables, including
• Time spent waiting in line at the post office
• Height of a football player
• Time between customer arrivals
• Can you think of others?
Continuous random variables
Definition A random variable 𝑋: Ω → ℝ is continuous if there exists a
non-negative function 𝑓: ℝ → ℝ such that the cdf of 𝑋 can be written
as:
𝑥
𝐹 𝑥 = න 𝑓 𝑡 𝑑𝑡
−∞
Notation: 𝑋~𝑈 𝑎, 𝑏
Example
Let 𝑋~𝑈(2,8).
Write the density function 𝑓(𝑥) and compute the following:
1. 𝑃 𝑋 < 6
2. 𝑃 𝑋 ≥ 6
3. 𝑃(−2 < 𝑋 < 5)
𝑋~𝑈(𝑎, 𝑏): cdf
Starting with the pdf 𝑓(𝑥), compute the cdf 𝐹 𝑥
1
𝑓 𝑥 = ቐ𝑏 − 𝑎 𝑥 ∈ 𝑎, 𝑏
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑋~𝑈 𝑎, 𝑏 : graphs
1 𝑥
0 𝑥<𝑎
𝑥 ∈ 𝑎, 𝑏 𝑥−𝑎
𝑓 𝑥 = ቐ𝑏 − 𝑎 𝐹 𝑥 = න 𝑓 𝑡 𝑑𝑡 = ൞ 𝑥 ∈ 𝑎, 𝑏
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 −∞ 𝑏−𝑎
1 𝑥>𝑏
Example: piecewise-defined
Given that 𝑋 has constant densities on each of the intervals shown,
write and graph 𝑓 𝑥 .
𝑃 0 < 𝑋 ≤ 2 = 0.4
𝑃 2 < 𝑋 ≤ 4 = 0.1
𝑃 4 < 𝑋 ≤ 9 = 0.5
*Conditional probability
Before introducing the next distribution, we recall that the conditional
probability of 𝐴 given 𝐵 is defined as follows:
∀𝐴, 𝐵 ∈ Ω such that 𝑃 𝐵 ≠ 0,
𝑃 𝐴∩𝐵
𝑃 𝐴𝐵 =
𝑃 𝐵
Example
Roll two fair, 6-sided dice and take the sum the faces.
1. What is the probability that an 8 is rolled?
2. Given that the first die shows a 5, what is the probability that an 8 was
rolled?
Die 1\Die 2 𝟏 𝟐 𝟑 𝟒 𝟓 𝟔
𝟏 2 3 4 5 6 7
𝟐 3 4 5 6 7 8
𝟑 4 5 6 7 8 9
𝟒 5 6 7 8 9 10
𝟓 6 7 8 9 10 11
𝟔 7 8 9 10 11 12
Tired of waiting in line?
Let 𝑋~𝑃𝑜(𝜆) where 𝜆 is the mean number of people arriving per unit
time.
A decision maker (DM) wants to model the waiting time until the first
arrival. i.e. 𝑃 𝑇 ≤ 𝑡 = 𝐹 𝑡 .
Write the distribution for 𝑇.
Still tired of waiting?
Exponential distribution
Definition A random variable 𝑋 has an exponential distribution with
parameter α > 0, if its probability density function is:
𝛼𝑒 −𝛼𝑥 𝑥≥0
𝑓 𝑥 =ቊ
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Notation: 𝑋~𝐸𝑥𝑝 𝛼
𝑥 0 𝑥<0
The cdf is 𝐹 𝑥 = −∞ 𝑓 𝑡 𝑑𝑡 = ቊ
1 − 𝑒 −𝛼𝑥 𝑥≥0
𝑋~𝐸𝑥𝑝 𝛼 : graphs
𝛼𝑒 −𝛼𝑥 𝑥≥0 0 𝑥<0
𝑓 𝑥 =ቊ 𝐹 𝑥 =ቊ
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 1 − 𝑒 −𝛼𝑥 𝑥≥0
Exponential distribution: normalization
Show that the normalization condition holds for 𝑋~𝐸𝑥𝑝 𝛼
Example
Suppose the length of time to be helped by a B-in-Touch representative
1
is an exponential random variable with parameter 𝛼 = .
30
(We will learn shortly that this corresponds to an average wait time of ...)
Suppose that a fellow student just submitted a ticket.
1
𝑋~𝐸𝑥𝑝
30
1. What is the probability you will wait less than 10 minutes?
2. What is the probability you will wait more than 1 hour?
Forgetful
Given 𝑋~𝐸𝑥𝑝(𝛼), calculate the following:
𝑃 𝑋 >𝑎+𝑏 𝑋 >𝑎 =
Memoryless
Property (no memory) For 𝑋~𝐸𝑥𝑝(𝛼), the following holds:
1 (𝑥−𝜇)2
−
𝑓 𝑥 = 𝑒 2𝜎2
𝜎 2𝜋
where 𝑥, 𝜇, 𝜎 ∈ ℝ and 𝜎 > 0
Notation: 𝑋~𝑁 𝜇, 𝜎 2
The cumulative distribution function is:
𝑥
1 (𝑡−𝜇)2
−
𝐹 𝑥 =න 𝑒 2𝜎2 𝑑𝑡
−∞ 𝜎 2𝜋
The normal distribution: graph
𝑋~𝑁 0,1 𝑋~𝑁 3,0.4
The normal distribution
2 𝑥 −𝑡 2
erf 𝑥 = න 𝑒 𝑑𝑡 , −∞ < 𝑥 < +∞
𝜋 0
1 𝑥
Φ 𝑥 = 1 + erf , −∞ < 𝑥 < +∞
2 2
BIEM 16’s heights☺ (z-scores)