3. Continuous Random Variables
3. Continuous Random Variables
Thierry Savin
Lent 2024
the royal flush, the best possible hand in poker, has a probability 0.000154%
Introduction
Course’s contents
1. Probability Fundamentals
1/26
Introduction
This lecture’s contents
Introduction
2/26
Introduction
Continuous Random Variables
3/26
Fundamentals
Definition of a continuous random variable
▶ Bayes’ rule
▶ Independence
▶ In particular, we call
E[Xn ] the nth moment
E[(X − E[X])n ] the nth central moment
The following moments are important:
• The mean (or first moment)
Z +∞
E[X] = x fX (x)dx
−∞
• The variance (or second central moment)
Var[X] = E[(X − E[X])2 ] = E[X2 ] − E[X]2
10/26
Probability Density Function
Other characteristics of a PDF
▶ The 1st and 3rd quartiles are the values Q1/4 and Q3/4 of x at
which FX (x) = 14 and 34 , respectively
▶ The interquartile range: Q3/4 − Q1/4
▶ The skewness E[(X − E[X])3 ]/σ 3 . If the skewness is positive,
the distribution is skewed to the right (the “tail” of the
distribution is longer to the right)
11/26
Probability Density Function
Characteristics of a PDF
fX (x)
mode standard deviation
mean
E[(X − E[X])3 ]
>0
σ3
x
median
(2ndquartile)
1st quartile 3rd quartile
interquartile range
12/26
The Exponential Density
Definition
13/26
The Exponential Density
Definition [DB p.28]
fX (x) FX (x)
2 1
1.5 0.75
1 0.5
0.5 0.25 λ= 2
λ= 1
λ = 0.5
0 x 0 x
0 1 2 3 4 5 0 1 2 3 4 5
Z +∞
Verify that fX (x)dx = 1.
−∞
14/26
The Exponential Density
Properties of X ∼ Exp(λ)
▶ Expectation E[X] = 1
[DB p.28]
λ ∞
Z ∞ Z ∞
−λx ∞ 1
dx = −xe −λx e −λx dx = − e −λx
E[X] = xλe 0
+
0 0 λ 0
▶ Variance Var[X] = 1
[DB p.28]
Z ∞
λ2 Z ∞
∞ 2
E[X2 ] = x 2 λe −λx dx = −x 2 e −λx 0 + 2xe −λx dx =
0 0 λ2
▶ Mode xmax = 0
Obvious from the curve. . .
▶ Median Q1/2 = ln 2
λ
See next
ln 34
▶ Quartile Qp = − ln(1−p)
λ , Q1/4 = λ , Q3/4 = ln 4
λ
Z x
FX (x) = fX (ξ)dξ = 1 − e −λx so FX (Qp ) = p ⇔ 1 − e −λQp = p
0
▶ Skewness 2 > 0 (strongly right-tailed)
Tedious but not difficult
15/26
The Exponential Density
Examples
16/26
The Gaussian Density
Definition [DB p.28]
0.75
0.4
0.5
0.2
(µ, σ 2 ) = −1, 21
0.25 (µ, σ 2 ) = (0, 1)
(µ, σ 2 ) = (2, 2)
0 x 0 x
−4 −2 0 2 4 6 −4 −2 0 2 4 6
Z +∞
R +∞ 2 R +∞ R +∞
Verify that fX (x)dx = 1; hint: calculate −∞
2
e −x dx = −∞ −∞ e −(x
2 +y 2 )
dxdy in cylindrical coordinates
−∞
2
named after the German mathematician Carl Friedrich Gauss (1777-1855)
17/26
The Gaussian Density
Cumulative distribution
18/26
The Gaussian Density
Properties of X ∼ N (µ, σ 2 )
▶ Mode xmax = µ
Obvious from the curve. . .
▶ Median Q1/2 = µ
See next
▶ Quartile Qp = µ + σΦ−1 (p)
Quartile of Y is Φ−1 (p)
Φ−1 (1/2) = 0 and Φ−1 (3/4) = −Φ−1 (1/4) ≈ 0.6745
▶ Skewness 0
By symmetry
19/26
The Gaussian Density
Properties of X ∼ N (µ, σ 2 )
20/26
The Gaussian Density
Examples
fX (x) FX (x)
1
2
0.75
1.5
0.5
1
(α, β) = (1, 1)
α
▶ Expectation E[X] = α+β [DB p.28]
αβ
▶ Variance Var[X] = (α+β)2 (α+β+1) [DB p.28]
25/26
Additional Remarks
26/26
You can attempt all problems in Examples Paper 5