Chapter 5A: Continuous Random Variables, PDFs, and Uniform Distribution  
MATH/STAT 394: Probability I  
Arman Jahangiri  
University of Washington Department of Mathematics  
Summer 2026  
Arman Jahangiri  
Summer 2026  
1
 
Learning Goals  
By the end of this lecture, students should be able to:  
define and interpret PDFs and CDFs;  
compute probabilities by integrating a PDF;  
recognize valid PDFs;  
compute expectation for continuous random variables;  
define and use the Uniform distribution;  
understand the universality of the Uniform distribution.  
Arman Jahangiri  
Summer 2026  
2
Continuous Random Variables  
Arman Jahangiri  
Summer 2026  
3
From Discrete to Continuous Random Variables  
Discrete random variables take values in a finite or countably infinite set.  
Continuous random variables can take any value in an interval, such as  
(0, 1),  
(a, b),  
[0, ),  
R.  
Main difference  
For a continuous random variable,  
P(X = x) = 0  
for every individual point x.  
Arman Jahangiri  
Summer 2026  
4
Probability Density Functions  
Definition  
For a continuous random variable X, the probability density function, or PDF, is a function f such that  
Z
P(X A) =  
f (x) dx, A R  
A
The value f (x) itself is not a probability (could be greater than 1).  
Probabilities are areas under the density curve.  
Arman Jahangiri  
Summer 2026  
5
Valid PDFs  
A function f is a valid PDF if:  
f (x) 0  
for all x,  
and  
Z
−∞ f (x) dx = 1.  
Analogy  
For discrete random variables:  
X
pX (x) 0,  
pX (x) = 1.  
x
For continuous random variables:  
Z
fX (x) 0,  
−∞ f (x) dx = 1.  
Arman Jahangiri  
Summer 2026  
6
CDF and PDF  
CDF has the same formula for continuous and discrete r.v.s, i.e.  
F(x) = P(X x).  
For a continuous random variable with PDF f , according to the definition of PDF,  
Z
x
F(x) = −∞ f (t) dt.  
Note that, according to the definition of CDF,  
P(a < X b) = F(b) F(a)  
This, together with the Fundamental Theorem of Calculus, implies that  
d
F(x) = F(x) = f (x)  
(1)  
dx  
For continuous r.v.s, since P(X = a) = 0 for any a R,  
P(X a) = P(X < a),  
P(X a) = P(X > a),  
P(a X b) = P(a < X b) = P(a X < b) = P(a < X < b).  
Arman Jahangiri  
Summer 2026  
7
What Does the Density f (x) Mean?  
For a continuous random variable,  
Z
x
F(x) = P(X x) = −∞ f (t) dt.  
For a small number ϵ > 0,  
P(x X x + ϵ) = F(x + ϵ) F(x).  
Therefore,  
P(x X x + ϵ)  
F(x + ϵ) F(x)  
=
.
ϵ
ϵ
Taking the limit as ϵ 0,  
By the definition of derivative,  
Thus,  
P(x X x + ϵ)  
F(x + ϵ) F(x)  
lim  
ϵ0  
= lim  
.
ϵ0  
ϵ
ϵ
F(x + ϵ) F(x)  
f (x) = F(x) = lim  
.
ϵ0  
ϵ
P(x X x + ϵ)  
f (x) = lim  
ϵ0  
ϵ
Arman Jahangiri  
Summer 2026  
8
Expectation for Continuous Random Variables  
Definition  
If X is continuous with PDF f , then  
Z
E(X) = −∞ xf (x) dx.  
If the support is an interval, we integrate over that interval.  
Expectation is still the balancing point of the distribution.  
Arman Jahangiri  
Summer 2026  
9
Continuous LOTUS  
LOTUS  
If X has PDF f and g : R R, then  
Z
E(g(X)) = −∞ g(x)f (x) dx.  
Proof idea. For a small interval [x, x + ∆x],  
P(x X x + ∆x) f (x)∆x.  
On this interval, g(X) is approximately g(x). Hence,  
g(X)P(x X x + ∆x) g(x)f (x)∆x.  
Adding over many small intervals,  
X
E(g(X)) ≈  
g(xi )f (xi )∆x.  
i
Taking the limit as ∆x 0, the Riemann sum becomes  
E(g(X)) = −∞ g(x)f (x) dx.  
Arman Jahangiri  
Summer 2026 10  
Uniform Distribution  
Arman Jahangiri  
Summer 2026 11  
Uniform Distribution  
Definition  
A random variable U has the Uniform distribution on (a, b) if its PDF is  
1
,
a < x < b,  
b a  
f (x) =  
0,  
otherwise.  
We write  
U Unif(a, b).  
PDF Verification  
1
f (x) =  
> 0  
b a  
since b > a. And  
Z
Z
b
1
1
−∞ f (x) dx =  
dx =  
(b a) = 1.  
b a  
b a  
a
Arman Jahangiri  
Summer 2026 12  
Uniform CDF  
If  
U Unif(a, b),  
then its CDF is  
0,  
x a,  
x a  
b a  
1,  
F(x) =  
,
a < x < b,  
x b.  
For the standard Uniform,  
we have  
U Unif(0, 1),  
F(x) = x, 0 < x < 1.  
Arman Jahangiri  
Summer 2026 13  
Universality of the Uniform  
Arman Jahangiri  
Summer 2026 14  
Why the Uniform Distribution Is Special  
The Uniform distribution is a universal starting point for simulation.  
Many algorithms first generate  
U Unif(0, 1),  
then transform U to obtain another distribution.  
Main idea  
A Uniform random variable can be transformed into a random variable with many other distributions.  
Arman Jahangiri  
Summer 2026 15  
Inverse CDF Method  
Suppose F is a continuous, strictly increasing CDF.  
Let  
U Unif(0, 1).  
Define  
Then  
X = F1(U).  
X has CDF F.  
This is called the inverse CDF method or inverse transform sampling.  
Arman Jahangiri  
Summer 2026 16  
Why the Inverse CDF Method Works  
Let  
X = F1(U).  
Then  
P(X x) = P(F1(U) x).  
Since F is increasing,  
Therefore,  
F
1(U) x  
⇐⇒ U F(x).  
P(X x) = P(U F(x)).  
Because U Unif(0, 1),  
Thus X has CDF F.  
P(U F(x)) = F(x).  
Arman Jahangiri  
Summer 2026 17  
Probability Integral Transform  
Conversely, if X has continuous strictly increasing CDF F, then  
F(X) Unif(0, 1).  
Interpretation  
Applying the CDF to a random variable converts its value into a percentile.  
For example, if exam scores have CDF F, then F(X) is the percentile of a randomly selected student.  
Arman Jahangiri  
Summer 2026 18  
Uniform Mean and Variance  
If U Unif(a, b), then  
1
fU (u) =  
,
a u b.  
b a  
Mean  
Z
b
b
1
1
u2  
b2 a2  
a + b  
E(U) =  
u
du =  
=
=
.
b a  
b a  
2
2(b a)  
2
a
a
Variance  
First,  
Z
b
1
b3 a3  
a2 + ab + b2  
E(U2) =  
u2  
du =  
=
.
b a  
3(b a)  
3
a
Thus,  
2
a2 + ab + b2  
a + b  
(b a)2  
Var(U) = E(U2) [E(U)]2 =  
=
.
3
2
12  
Arman Jahangiri  
Summer 2026 19  
Location-Scale Transformation  
If  
U Unif(0, 1),  
then  
a + (b a)U Unif(a, b).  
This transforms:  
(0, 1) (a, b).  
Useful idea  
Start with the standard Uniform and shift/scale to get any Uniform interval.  
Arman Jahangiri  
Summer 2026 20  
Summary  
Continuous random variables have probabilities over intervals, not points.  
A PDF integrates to probabilities:  
Z
b
P(a < X < b) =  
f (x) dx.  
a
A valid PDF is nonnegative and integrates to 1.  
The CDF is accumulated area:  
Z
x
F(x) = −∞ f (t) dt.  
Uniform probabilities are proportional to interval length.  
The Uniform distribution is universal through the inverse CDF method.  
Next lecture  
Normal and Exponential distributions.  
Arman Jahangiri  
Summer 2026 21