Moment Generating Functions

The moment generating function packages an entire distribution into one function:

The moment generating function
MX(t)=E[etX]M_X(t) = E\left[e^{tX}\right]

Differentiate at zero and the moments fall out, which is what makes it a tool rather than a curiosity.

defined for tt in an open interval around 0. Where it exists, it does three jobs that are each hard by other means.

Job one: generating moments

Differentiate and evaluate at zero:

E[Xn]=MX(n)(0)E[X^n] = M_X^{(n)}(0)

The mechanism is the exponential series. Since etX=1+tX+t2X22!+e^{tX} = 1 + tX + \frac{t^2X^2}{2!} + \cdots, taking expectations gives

MX(t)=1+tE[X]+t2E[X2]2!+M_X(t) = 1 + tE[X] + \frac{t^2E[X^2]}{2!} + \cdots

so the moments sit in the Taylor coefficients, and differentiating picks them out one at a time.

For an exponential distribution with rate λ\lambda, MX(t)=λλtM_X(t) = \frac{\lambda}{\lambda - t} for t<λt < \lambda. Then M(0)=1λM'(0) = \frac{1}{\lambda} and M(0)=2λ2M''(0) = \frac{2}{\lambda^2}, giving Var(X)=2λ21λ2=1λ2\text{Var}(X) = \frac{2}{\lambda^2} - \frac{1}{\lambda^2} = \frac{1}{\lambda^2} with no integration by parts anywhere.

The rest of this lesson is for subscribers

Unlock every lesson in Fundamentals of Probability and Statistics, and every other premium course.

Subscribe to continue

Test your knowledge

Questions are only available to subscribers.

Keep reading Fundamentals of Probability and Statistics

41 lessons in this course, and every other premium course, on one subscription.

  • Every lesson in every course, with the worked examples and interactive simulators
  • Graded questions on every lesson, with explanations for the wrong answers as well as the right one
  • The trainers, timed assessments and brainteaser library that go with them