Chapter 6B: Moment Generating Functions  
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 the moment generating function (MGF);  
compute MGFs of common distributions;  
extract moments from MGFs;  
understand how MGFs determine distributions;  
compute distributions of sums using MGFs;  
derive moments of Exponential and Normal distributions using MGFs.  
Arman Jahangiri  
Summer 2026  
2
Definition of the MGF  
Definition  
The moment generating function (MGF) of X is  
MX (t) = E(etX  
)
provided the expectation is finite in some open interval around 0.  
Equivalently,  
X
etx pX (x),  
if X is discrete,  
x
Z
MX (t) =  
−∞ etx fX (x) dx, if X is continuous.  
Quick check  
Every valid MGF satisfies  
MX (0) = 1.  
Arman Jahangiri  
Summer 2026  
3
MGFs: Discrete Distributions I  
X
MX (t) = E(etX ) =  
etx pX (x).  
x
Bernoulli  
If X Bern(p), then  
MX (t) = et·1p + et·0(1 p) = pet + q.  
Discrete Uniform  
If X DUnif{1, . . . , m}, then  
m
et (emt 1)  
X
1
1
MX (t) =  
etk  
=
et + e2t + · · · + emt  
=
.
m
m
m(et 1)  
k=1  
Arman Jahangiri  
Summer 2026  
4
MGFs: Discrete Distributions II  
Binomial  
If X Bin(n, p), then  
n
n
ꢂ ꢃ  
ꢂ ꢃ  
X
X
n
n
MX (t) =  
etk  
pk qnk  
=
(pet )k qnk = (q + pet )n.  
k
k
k=0  
k=0  
Poisson  
If X Pois(λ), then  
t
k
λ λk  
(λe )  
X
X
t
t
MX (t) =  
etk  
e
= eλ  
= eλeλe = eλ(e  
1)  
.
k!  
k!  
k=0  
k=0  
Arman Jahangiri  
Summer 2026  
5
MGFs: Discrete Distributions III  
Geometric  
If X Geom(p), where X counts failures before the first success, then  
X
X
p
MX (t) =  
etk qk p = p  
(qet )k  
=
,
qet < 1.  
1 qet  
k=0  
k=0  
Negative Binomial  
If X NegBin(r, p), where X counts failures before the r-th success, then  
r
X
X
k + r 1  
k + r 1  
p
MX (t) =  
etk  
pr qk = pr  
(qet )k  
=
.
k
k
1 qet  
k=0  
k=0  
Arman Jahangiri  
Summer 2026  
6
MGFs: Discrete Distributions IV  
Hypergeometric  
If  
X HGeom(w, b, n),  
then  
ꢀ ꢁꢀ  
w
k
b
nk  
P(X = k) =  
,
w+b  
n
where  
max(0, n b) k min(w, n).  
Therefore,  
ꢀ ꢁꢀ  
min(w,n)  
w
k
b
X
nk  
MX (t) =  
etk  
.
w+b  
n
k=max(0,nb)  
Note: Unlike Binomial or Poisson, this MGF usually does not simplify to a nice elementary closed form.  
Arman Jahangiri  
Summer 2026  
7
MGFs: Continuous Distributions I  
Z
tx  
MX (t) = E(etX ) =  
e
fX (x) dx.  
−∞  
Uniform  
If X Unif(a, b), then  
Z
b
a
b
1
1
etx  
t
etb eta  
MX (t) =  
etx  
dx =  
=
,
t
̸= 0.  
b a  
b a  
t(b a)  
a
Also, MX (0) = 1.  
Arman Jahangiri  
Summer 2026  
8
MGFs: Continuous Distributions II  
Exponential  
If X Exp(λ), then  
Z
Z
λ
MX (t) =  
etx λeλx dx = λ  
e(λt)x dx =  
,
t < λ.  
λ t  
0
0
Gamma  
If X Gamma(α, λ), with shape α and rate λ, then  
Z
Z
λα  
λα  
MX (t) =  
etx  
xα1eλx dx =  
xα1e(λt)x dx.  
Γ(α)  
Γ(α)  
0
0
Let u = (λ t)x. Then x = u/(λ t), dx = du/(λ t), and  
Z
α
λα  
1
λα  
(λ t)α  
λ
MX (t) =  
uα1eu du =  
=
,
t < λ.  
Γ(α) (λ t)α  
λ t  
0
|
{z  
}
Γ(α)  
Arman Jahangiri  
Summer 2026  
9
MGF of N(0, 1)  
Standard Normal  
Let Z N(0, 1). Then  
Z
2
1
tz  
MZ (t) = E(etZ ) = √  
e
ez /2 dz.  
2π  
−∞  
Complete the square:  
Therefore,  
z2  
1
1
(z t)2  
t2  
tz −  
= (z2 2tz) = (z t)2 t2 = −  
+
.
2
2
2
2
2
Z
Z
2
2
2
2
1
1
(zt)  
/2  
(zt)  
e
/2 dz.  
MZ (t) = √  
e
/2et /2 dz = et  
2π  
2π  
−∞  
−∞  
Since the last integral equals 2π,  
2
MZ (t) = et  
.
/2  
Arman Jahangiri  
Summer 2026 10  
MGF of N(µ, σ2)  
Normal  
Let X N(µ, σ2). Write  
X = µ + σZ,  
Z N(0, 1).  
Then  
MX (t) = E(etX ) = E et(µ+σZ) = eµt E(eσtZ ).  
Using  
2
MZ (s) = es  
,
/2  
with s = σt, we get  
2
2
1
2
2
2
= eµt+  
.
t
/2  
σ
t
MX (t) = eµt MZ (σt) = eµt eσ  
Arman Jahangiri  
Summer 2026 11  
Moments from MGFs  
Arman Jahangiri  
Summer 2026 12  
MGFs Generate Moments  
Theorem  
The nth population moment is obtained by differentiating the MGF:  
E(Xn) = MX(n)(0).  
Examples:  
E(X) = MX(0),  
E(X2) = MX′′(0).  
Arman Jahangiri  
Summer 2026 13  
Proof: MGFs Generate Moments  
Recall that the moment generating function is  
MX (t) = E(etX ).  
Differentiate once:  
d
MX(t) =  
dt  
d
E(etX ) = E  
etX = E(XetX ).  
dt  
Now plugging in t = 0,  
MX(0) = E(Xe0) = E(X).  
Differentiate another time noting that X is a constant w.r.t. t.  
d
d
MX′′(t) =  
E(XetX ) = E  
XetX = E(X2etX ).  
dt  
dt  
Plugging in t = 0,  
MX′′(0) = E(X2e0) = E(X2).  
Similarly, differentiating n times gives  
Therefore, at t = 0,  
MX(n)(t) = E(XnetX ).  
MX(n)(0) = E(Xne0) = E(Xn).  
Arman Jahangiri  
Summer 2026 14  
Another way of seeing it...  
The Taylor expansion of  
is  
etX  
t2X2  
etX = 1 + tX +  
+ · · · .  
2!  
Taking expectations:  
t2  
MX (t) = 1 + tE(X) +  
E(X2) + · · · .  
2!  
The moments appear as Taylor coefficients.  
Arman Jahangiri  
Summer 2026 15  
Example: Bernoulli Moments  
For  
MX (t) = pet + q,  
MX(t) = pet .  
MX(0) = p.  
we compute:  
Thus:  
So  
E(X) = p.  
Arman Jahangiri  
Summer 2026 16  
MGF Uniqueness Theorem  
Theorem (Uniqueness of MGF)  
If two random variables have the same MGF on an interval around 0, then they have the same distribution,  
i.e., the moment generating function uniquely determines the distribution.  
Thus MGFs characterize distributions, similarly to PDFs and CDFs.  
Arman Jahangiri  
Summer 2026 17  
MGFs of Sums  
Arman Jahangiri  
Summer 2026 18  
MGF of a Sum  
Theorem  
If X and Y are independent, then  
MX+Y (t) = MX (t) × MY (t).  
More generally, if X1, . . . , Xn are independent, then  
n
Y
MP  
(t) =  
MX (t)  
n
i=1  
X
i
i
i=1  
This is one of the main reasons MGFs are useful. Since using the MGF Uniqueness theorem, the MGF characterize  
the distribution in full.  
Arman Jahangiri  
Summer 2026 19  
Binomial MGF  
A Binomial random variable can be written as:  
X = I1 + · · · + In,  
where the Ij are independent Bernoulli(p) random variables.  
Since each Bernoulli MGF is  
pet + q,  
we get  
MX (t) = (pet + q)n.  
Arman Jahangiri  
Summer 2026 20  
Negative Binomial MGF  
If  
X NBin(r, p),  
then  
X = G1 + · · · + Gr ,  
where the Gj are independent Geometric(p) random variables.  
Thus,  
r
p
MX (t) =  
.
1 qet  
Arman Jahangiri  
Summer 2026 21  
Sums via MGFs  
Arman Jahangiri  
Summer 2026 22  
Sum of Independent Poissons  
If  
X Pois(λ),  
Y Pois(µ),  
independently, then  
t
1)  
MX (t) = eλ(e  
,
and  
t
1)  
MY (t) = eµ(e  
.
Therefore,  
Hence:  
t
1)  
MX+Y (t) = e(λ+µ)(e  
.
X + Y Pois(λ + µ).  
Remark: This can be generalized to n independent Poisson r.v.s using induction.  
Arman Jahangiri  
Summer 2026 23  
Sum of Independent Normals  
If  
X1 N(µ1, σ12),  
X2 N(µ2, σ22),  
independently, then  
Thus,  
2
2
2
1
2
+µ )t+ (σ +σ )t  
2
2 (t) = e(µ  
.
1
1
2
MX  
+X  
1
X1 + X2 N(µ1 + µ2, σ12 + σ22).  
Remark: This can be generalized to n independent Normal r.v.s using induction.  
Arman Jahangiri  
Summer 2026 24  
Distributions Closed Under Addition Under Independence  
Distribution  
Assumption  
Sum Distribution  
n
X
Bernoulli  
Xi Bern(p)  
Xi Bin(n, p)  
i=1  
n
X
X
Binomial  
Poisson  
Xi Bin(ni , p)  
Xi Bin  
ni , p  
i=1  
n
X
X
Xi Pois(λi )  
Xi Pois  
λi  
i=1  
n
X
X
Negative Binomial Xi NegBin(ri , p)  
Xi NegBin  
ri , p  
i=1  
n
X
Geometric  
Normal  
Xi Geom(p)  
Xi N(µi , σi2)  
Xi Gamma(αi , λ)  
Xi Exp(λ)  
Xi NegBin(n, p)  
i=1  
n
X
X
X
Xi N  
µi ,  
σi2  
i=1  
n
X
X
Gamma  
Xi Gamma  
αi , λ  
i=1  
n
X
Exponential  
Xi Gamma(n, λ)  
i=1  
Arman Jahangiri  
Summer 2026 25  
Summary  
MGFs encode moments through derivatives.  
MGFs determine distributions.  
Independent sums correspond to products of MGFs.  
MGFs simplify moment calculations dramatically.  
The Normal and Exponential MGFs are especially important.  
Next lecture  
Joint distributions.  
Arman Jahangiri  
Summer 2026 26