LessonThis is a lesson restated in new words. Any figure in it is an example from the source, not this desk's record.

The moment generating function of a random variable is the expected value of e raised to theta times the variable. For a standard normal variable it equals e to the power of theta squared over 2. For a general normal variable with mean mu and variance sigma squared, it equals e to the power of mu times theta, plus sigma squared times theta squared over 2. Differentiate in theta and then set theta to zero, and the derivatives are the moments. A standard Brownian motion, a normal noise with mean 0 and variance equal to the time index, has first moment 0 and second moment equal to that time.

Why it matters

Moments are the summaries you already use: the mean, the second moment, and, if you keep going, skewness and kurtosis. Computing each one as a separate integral against the density gets worse as the power rises. The generating function packs the moments into one object. The lecture’s reason to care, beyond the normal formula, is Brownian motion. Every time you model a path with that noise, you are using a normal law whose variance is the time step. The same derivatives that recover mean 0 and variance 1 for the standard bell recover mean 0 and variance T for the motion at time T.

The idea in plain words

Let Z be standard normal, mean 0 and variance 1. Its density is 1 over the square root of 2 pi, times e to the minus z squared over 2. The expectation of a function of Z is the integral of that function times the density, over the whole line. The function here is e to the theta Z. Multiply the exponentials and the exponent is minus z squared over 2, plus theta Z.

Complete the square by adding and subtracting theta squared over 2. The exponent splits into a piece that is the kernel of a normal density with mean theta and variance 1, plus a piece theta squared over 2 that does not depend on z. The integral of a density over the whole line is 1, so that piece drops out. What remains is e to the theta squared over 2. That is the standard normal moment generating function.

A general normal Y can be written as mu plus sigma times Z. Put that inside the exponential, pull out the constant e to the theta mu, and what is left is the standard generating function evaluated at theta times sigma. Multiply the exponents and you get e to the mu theta plus sigma squared theta squared over 2. The lecture treats this reduction as the same idea as undoing a standardization, using linearity of expectation so the constant factor leaves the expectation.

How to use it

If you already know the variable is normal, write the generating function from mu and sigma rather than integrating again. Read the mean as the first derivative at theta equals zero and the second moment as the second derivative there. Subtract the square of the mean if you need the variance and the mean is not zero. In both worked cases the mean was zero, so the second derivative was the variance.

What usually goes wrong

Evaluating the derivative and forgetting to set theta to zero leaves you with a function, not a moment. The lecture’s answers, 0 and 1, appear only after that substitution. The higher powers of theta are what get wiped out.

Questions people ask

What is the standard normal moment generating function?

e to the power of theta squared over 2. It is what remains after the density integral is recognized as 1. The first derivative at theta equals zero is 0. The second is 1.

How does the general normal case follow?

Write the variable as mu plus sigma times a standard normal, factor e to the theta mu out of the expectation, and reuse the standard formula at theta times sigma. The exponent becomes mu theta plus sigma squared theta squared over 2.

What moments did Brownian motion produce?

With mean 0 and variance T, the first derivative at zero was 0 and the second was T. That matches the mean and variance used to write the function.