This page is the drill hall for the MGF . We are not re-teaching the theory — we are walking every kind of problem an exam can throw at you , one cell at a time.
Before you compute anything, remember the two machines you already own:
Extraction: E [ X n ] = M X ( n ) ( 0 ) — differentiate n times, then set the dial t to 0 .
Combination: if X and Y are independent , M X + Y ( t ) = M X ( t ) M Y ( t ) .
Everything below is one of those two machines, plus care about where the MGF is allowed to live (its convergence interval).
Every MGF problem falls into one of these case classes . The whole point of this page is that after reading it you have seen every row filled in with a full solution.
Cell
Case class
What makes it tricky
Covered by
A
Discrete, finite support
just sum e t x p ( x ) — no calculus to build it
Ex 1
B
Discrete, infinite support
it's a geometric series — needs a convergence condition
Ex 2
C
Continuous, one-sided domain
integral converges only for some t — sign of exponent matters
Ex 3
D
Degenerate variable (X = c constant)
"no randomness" — does the MGF still work?
Ex 4
E
Shift & scale (a X + b ), sign of a
negative a flips the convergence interval
Ex 5
F
Sum of independents
multiply MGFs, then recognise the answer
Ex 6
G
Limiting behaviour (n → ∞ )
MGF → a known MGF ⇒ distribution converges
Ex 7
H
Real-world word problem
translate words → distribution → MGF → number
Ex 8
I
Exam twist (given MGF, work backwards)
no distribution named — read it off the MGF
Ex 9
Intuition Read the matrix as a checklist
Signs appear in cell C (exponent sign controls convergence) and E (negative scale flips the interval). Zero/degenerate input is cell D . Limiting behaviour is cell G . If you can do all nine, you can do any MGF problem.
Worked example A fair die
Let X be the result of one roll of a fair six-sided die, so X ∈ { 1 , 2 , 3 , 4 , 5 , 6 } each with probability 6 1 . Find M X ( t ) and use it to get E [ X ] .
Forecast: guess the mean of a fair die before reading on. (It should come out 3.5 .)
Step 1 — Write the defining sum.
M X ( t ) = ∑ x = 1 6 e t x ⋅ 6 1 = 6 1 ( e t + e 2 t + e 3 t + e 4 t + e 5 t + e 6 t ) .
Why this step? For a discrete variable the MGF is literally the sum ∑ x e t x p ( x ) — no integral, no series tricks. Finite support means the sum is finite, so M X ( t ) exists for all t (nothing can blow up).
Step 2 — Sanity-check the dial at zero.
M X ( 0 ) = 6 1 ( 1 + 1 + 1 + 1 + 1 + 1 ) = 1. ✓
Why this step? M X ( 0 ) = E [ 1 ] = 1 always . If it isn't 1 , stop — you have an algebra bug.
Step 3 — Differentiate once.
M X ′ ( t ) = 6 1 ( e t + 2 e 2 t + 3 e 3 t + 4 e 4 t + 5 e 5 t + 6 e 6 t ) .
Why this step? E [ X ] = M X ′ ( 0 ) — one derivative pulls down exactly one factor of the exponent (which is the value x ).
Step 4 — Set t = 0 .
E [ X ] = M X ′ ( 0 ) = 6 1 ( 1 + 2 + 3 + 4 + 5 + 6 ) = 6 21 = 3.5.
Verify: Directly, E [ X ] = 6 1 ∑ x = 1 6 x = 3.5 . Matches. ✓
Worked example Geometric on
{ 0 , 1 , 2 , … }
Let X count failures before the first success , P ( X = k ) = ( 1 − p ) k p for k = 0 , 1 , 2 , … , with 0 < p < 1 . Find M X ( t ) , its convergence interval, and E [ X ] .
Forecast: with infinitely many terms, we must worry when the sum converges . Guess: it should only work when t is small enough that e t can't overpower ( 1 − p ) .
Step 1 — Write the sum and group the k -th power.
M X ( t ) = ∑ k = 0 ∞ e t k ( 1 − p ) k p = p ∑ k = 0 ∞ [ ( 1 − p ) e t ] k .
Why this step? Collecting everything raised to k turns the sum into a geometric series ∑ r k with ratio r = ( 1 − p ) e t . That is the only tool that sums an infinite discrete support in closed form.
Step 2 — Demand convergence.
A geometric series ∑ r k converges to 1 − r 1 only if ∣ r ∣ < 1 :
( 1 − p ) e t < 1 ⟺ e t < 1 − p 1 ⟺ t < − ln ( 1 − p ) .
Why this step? This is cell B's whole lesson: infinite support ⇒ the MGF only exists on an interval , here t < − ln ( 1 − p ) , which is an open interval around 0 (good — 0 is inside it since − ln ( 1 − p ) > 0 ).
Step 3 — Sum it.
M X ( t ) = 1 − ( 1 − p ) e t p .
Check M X ( 0 ) = 1 − ( 1 − p ) p = p p = 1. ✓
Step 4 — Differentiate for the mean.
With u ( t ) = 1 − ( 1 − p ) e t , M X ( t ) = p u − 1 , so
M X ′ ( t ) = − p u − 2 u ′ ( t ) = − p u − 2 ( − ( 1 − p ) e t ) = ( 1 − ( 1 − p ) e t ) 2 p ( 1 − p ) e t .
Set t = 0 : u ( 0 ) = p , so
E [ X ] = M X ′ ( 0 ) = p 2 p ( 1 − p ) = p 1 − p .
Verify: the known mean of this "number of failures" geometric is p 1 − p . For p = 2 1 it gives 1 , matching a coin where you expect one failure before your first head on average. ✓
Worked example Exponential
( λ ) redone, watching the sign
f ( x ) = λ e − λ x for x ≥ 0 , λ > 0 . Rebuild M X ( t ) and see exactly which sign forces the domain.
Forecast: the integrand is e t x λ e − λ x = λ e ( t − λ ) x . Guess which sign of t − λ lets an integral over [ 0 , ∞ ) be finite.
Step 1 — Combine exponents.
M X ( t ) = ∫ 0 ∞ e t x λ e − λ x d x = λ ∫ 0 ∞ e ( t − λ ) x d x .
Why this step? One exponent instead of two makes the convergence question a single sign check .
Step 2 — The sign decides everything.
As x → ∞ , e ( t − λ ) x → 0 only if the exponent is negative: t − λ < 0 , i.e. t < λ . If t ≥ λ the integrand does not decay and the integral is ∞ — no MGF there.
Why this step? This is the sign-based "quadrant" analysis for continuous MGFs: a one-sided support (x ≥ 0 ) means only the sign of the exponent at + ∞ matters.
Step 3 — Integrate on the good side (t < λ ).
λ [ t − λ e ( t − λ ) x ] 0 ∞ = λ ( 0 − t − λ 1 ) = λ − t λ .
Check M X ( 0 ) = λ λ = 1. ✓
Step 4 — Moments.
M X ′ ( t ) = ( λ − t ) 2 λ ⇒ E [ X ] = M X ′ ( 0 ) = λ 1 ;
M X ′′ ( t ) = ( λ − t ) 3 2 λ ⇒ E [ X 2 ] = M X ′′ ( 0 ) = λ 2 2 ;
Var = λ 2 2 − λ 2 1 = λ 2 1 .
Verify: with λ = 2 : E [ X ] = 0.5 , Var = 0.25 , and domain t < 2 . All match the known exponential moments . ✓
The red curve above is M X ( t ) = λ − t λ for λ = 2 : notice it is finite and smooth around t = 0 but shoots to infinity as t → λ − = 2 (the dashed black wall). That vertical wall is the edge of the convergence interval.
Worked example A constant is still a random variable
Let X = c with probability 1 (a "sure thing"). Find M X ( t ) and confirm the machine still gives the right moments.
Forecast: a constant has mean c , variance 0 . Will the MGF respect that?
Step 1 — Compute the expectation.
M X ( t ) = E [ e tX ] = e t c ( one value c , probability 1 ) .
Why this step? The "sum" has exactly one term, e t c ⋅ 1 . Degenerate = the simplest possible support.
Step 2 — Domain.
e t c is finite for all t — a degenerate variable always has an MGF everywhere. M X ( 0 ) = e 0 = 1. ✓
Step 3 — Moments.
M X ′ ( t ) = c e t c ⇒ E [ X ] = M X ′ ( 0 ) = c .
M X ′′ ( t ) = c 2 e t c ⇒ E [ X 2 ] = M X ′′ ( 0 ) = c 2 .
Var = c 2 − c 2 = 0.
Verify: mean c , variance 0 — exactly what "no randomness" should give. Bonus: this matches the shift rule M Y ( t ) = e b t M X ( a t ) with a = 0 , b = c : setting the scale to zero is the degenerate case, and e c t M X ( 0 ) = e c t . ✓
Worked example Negative scaling flips the interval
X ∼ Exponential ( λ = 2 ) has M X ( t ) = 2 − t 2 valid for t < 2 . Let Y = − X (a reflection). Find M Y ( t ) and its domain .
Forecast: − X is X mirrored to the negative axis. Guess whether the domain stays t < 2 or flips to t > − 2 .
Step 1 — Apply the shift-and-scale rule with a = − 1 , b = 0 .
M Y ( t ) = M a X + b ( t ) = e b t M X ( a t ) = M X ( − t ) = 2 − ( − t ) 2 = 2 + t 2 .
Why this step? Property 1 turns "scale X by a " into "evaluate M X at a t " — no re-integration needed.
Step 2 — Transform the domain too (the sign trap).
The original needed its argument < 2 . The argument is now − t , so we need − t < 2 ⟺ t > − 2 .
Why this step? The convergence interval is a statement about the argument of M X , so when the argument flips sign, the interval flips: t < 2 becomes t > − 2 . Forgetting this is the classic sign error.
Step 3 — Read the moments.
M Y ′ ( t ) = − ( 2 + t ) 2 2 ⇒ E [ Y ] = M Y ′ ( 0 ) = − 2 1 = − E [ X ] . ✓
Verify: E [ Y ] = − 2 1 (correct, since Y = − X and E [ X ] = 2 1 ), and the domain is t > − 2 — the mirror image of t < 2 about 0 . ✓
Worked example Sum of two independent Poissons
Let X ∼ Poisson ( λ 1 ) and Y ∼ Poisson ( λ 2 ) be independent . Given that a Poisson( λ ) has MGF M ( t ) = e λ ( e t − 1 ) , find the distribution of S = X + Y .
Forecast: guess the distribution of S before computing. (Poissons famously "add.")
Step 1 — Multiply the MGFs.
M S ( t ) = M X ( t ) M Y ( t ) = e λ 1 ( e t − 1 ) e λ 2 ( e t − 1 ) .
Why this step? Property 2: independence turns the MGF of a sum into a product of MGFs. This is the whole reason MGFs make sum-problems trivial.
Step 2 — Combine exponents.
M S ( t ) = e ( λ 1 + λ 2 ) ( e t − 1 ) .
Why this step? Adding exponents of the two e ( ⋯ ) factors collapses them into one clean form.
Step 3 — Recognise it (uniqueness).
This is exactly the Poisson MGF template e λ ( e t − 1 ) with λ = λ 1 + λ 2 . By uniqueness , S ∼ Poisson ( λ 1 + λ 2 ) .
Why this step? If an MGF matches a known form, the distribution is identified — no pmf gymnastics needed.
Verify: means add: E [ S ] = M S ′ ( 0 ) . With M S ′ ( t ) = e t ( λ 1 + λ 2 ) e ( λ 1 + λ 2 ) ( e t − 1 ) , we get M S ′ ( 0 ) = λ 1 + λ 2 = E [ X ] + E [ Y ] . Consistent with the identified Poisson. ✓ (Numeric: λ 1 = 3 , λ 2 = 4 ⇒ Poisson( 7 ) , mean 7 .)
Worked example Binomial → Poisson, seen through MGFs
Fix μ > 0 . Let X n ∼ Binomial ( n , p = n μ ) , so we do n tiny-probability trials. Show M X n ( t ) → e μ ( e t − 1 ) as n → ∞ , i.e. X n converges to Poisson( μ ) .
Forecast: many rare trials → a Poisson. Guess the limiting MGF is the Poisson one.
Step 1 — Write the binomial MGF with p = μ / n .
M X n ( t ) = ( 1 − p + p e t ) n = ( 1 + n μ ( e t − 1 ) ) n .
Why this step? Substituting p = μ / n groups everything over n , exposing the pattern ( 1 + n a ) n .
Step 2 — Take the limit using ( 1 + n a ) n → e a .
With a = μ ( e t − 1 ) ,
lim n → ∞ M X n ( t ) = e μ ( e t − 1 ) .
Why this step? This is the definition of e a as a limit — the single tool that converts "n -th power of something near 1 " into an exponential.
Step 3 — Conclude by the continuity theorem.
The limit is the Poisson( μ ) MGF, so X n → d Poisson ( μ ) .
Why this step? Convergence of MGFs (in a neighbourhood of 0 ) implies convergence of distributions — the same engine used to prove the Central Limit Theorem .
Verify: at t = 0 both sides equal 1 ; and d t d 0 e μ ( e t − 1 ) = μ , matching E [ X n ] = n p = μ for every n . The mean is preserved through the limit. ✓
Worked example Waiting for a bus, then the total for the day
A bus's waiting time (in minutes) is Exponential ( λ = 4 1 ) , so E [ wait ] = 4 min. You catch three independent buses in a day, W 1 , W 2 , W 3 . What is the MGF of the total wait T = W 1 + W 2 + W 3 , and its expected value?
Forecast: three independent waits of 4 min each — guess the total's mean before computing.
Step 1 — MGF of one wait.
From Ex 3, M W ( t ) = λ − t λ = 1/4 − t 1/4 , valid for t < 4 1 .
Why this step? Translate the words "waiting time is exponential" into the exponential MGF.
Step 2 — Multiply for the independent sum.
M T ( t ) = ( M W ( t ) ) 3 = ( 1/4 − t 1/4 ) 3 , t < 4 1 .
Why this step? Property 2 again — three independent buses ⇒ product of three MGFs. (This is the MGF of a Gamma( 3 , 4 1 ) , if you recognise it.)
Step 3 — Expected total.
Means add: E [ T ] = 3 ⋅ λ 1 = 3 ⋅ 4 = 12 min. (Or differentiate M T once at 0 — same answer.)
Verify (units + magnitude): each wait averages 4 min; three of them average 12 min. Units are minutes throughout. ✓
Worked example "Identify me"
A random variable has MGF M X ( t ) = exp ( 3 t + 8 t 2 ) for all real t . Name the distribution and state its mean and variance — without being told what it is.
Forecast: the t 2 -in-the-exponent shape is a fingerprint. Which distribution has it?
Step 1 — Match against the normal template.
The normal MGF is M ( t ) = exp ( μ t + 2 1 σ 2 t 2 ) . Compare:
μ t + 2 1 σ 2 t 2 = 3 t + 8 t 2 .
Why this step? Uniqueness says: if the MGF matches a known family, the distribution is that family. So we just read off the parameters.
Step 2 — Solve for the parameters.
Coefficient of t : μ = 3 . Coefficient of t 2 : 2 1 σ 2 = 8 ⇒ σ 2 = 16 .
Why this step? Two coefficients, two unknowns — matching power series (see Taylor Series ) pins them down uniquely.
Step 3 — Conclude.
X ∼ N ( μ = 3 , σ 2 = 16 ) , so mean 3 , variance 16 , standard deviation 4 .
Verify (differentiate directly):
M X ′ ( t ) = ( 3 + 16 t ) e 3 t + 8 t 2 ⇒ M X ′ ( 0 ) = 3 = E [ X ] .
M X ′′ ( 0 ) = E [ X 2 ] ; computing gives E [ X 2 ] = 25 , so Var = 25 − 3 2 = 16 . Matches. ✓
Recall One-line recap of the matrix
Discrete finite (sum) ::: Ex 1 — just ∑ e t x p ( x ) , valid for all t .
Discrete infinite (geometric) ::: Ex 2 — series converges only where ∣ r ∣ < 1 .
Continuous one-sided (sign) ::: Ex 3 — exponent must be negative at + ∞ .
Degenerate constant ::: Ex 4 — M X ( t ) = e t c , variance 0 .
Negative scale ::: Ex 5 — M − X ( t ) = M X ( − t ) , interval flips sign.
Sum of independents ::: Ex 6 — multiply, then recognise (Poissons add).
Limit ::: Ex 7 — Binomial( n , μ / n ) → Poisson( μ ) via ( 1 + n a ) n → e a .
Word problem ::: Ex 8 — three exp waits, total mean 12 .
Reverse-engineer ::: Ex 9 — exp ( 3 t + 8 t 2 ) ⇒ N ( 3 , 16 ) .
Mnemonic The whole page in a breath
Discrete? sum. Continuous? watch the exponent's sign. Sum of independents? multiply. Limit? push n → ∞ . Given the MGF? match a template. And always check M X ( 0 ) = 1 first.
Related tools worth a click: Cumulant Generating Function (take ln of these MGFs), Characteristic Function (the always-exists cousin from cell C's failures), and Probability Distributions for the families we recognised.