Of Notes

Moment Generating Function

1 min read · revised 15 November 2026 · referred to by 3 notes · ·

Instead of manually doing moments of a distribution we leverage a generating function which analytically defines for some moment its moment.

Taking a random variable and plugging it into an exponential, we define

Expanding the Exponential

The exponential is the standard choice because its taylor series packs every power of into one function:

By linearity of the expected value:

so every raw moment already sits inside as a coefficient.

Extracting Moments by Differentiating

Differentiating with respect to shifts every coefficient down one place, and evaluating at kills all the terms that still carry a :

which is the first moment. Differentiating again:

which is the second moment. Always evaluating at , this generalises to

whenever the MGF exists in a neighbourhood of . In particular the variance is

Why the Exponential

  • Sums of independent random variables become products: , hence when and are independent.
  • For continuous variables, the integral is a Laplace transform, and setting gives a Fourier transform: the Characteristic Function.

We can extend this concept onto the next level: Cumulant Generating Functions

/ or Ctrl K
search; empty, it shows notes to revise and lately read
m
mark this note to revise, or unmark it
c
cover maths, proofs and solutions to test yourself
n
uncover the next covered item
y
copy this note’s org-roam link
e
copy this note as markdown, LaTeX kept as TeX
p
the next problem to work; there h hints, s shows the solution, x passes it for today
→ ← j k space
turn the page, when reading in pages
l
on the map, trace the greatest distance, then the longest path
double-click
a formula, to copy its TeX
rest on maths
bind a part of a formula and open the wheel of notes it comes from; scroll or ↑ ↓ widens it, 1–6 goes
?
this card