Skip to main content
The new Teacher Workspace is here. Your first 3 assignments are free. Try it →

Moment-Generating Function

The moment-generating function, or MGF, is M_X(t)=E[e^{tX}] for a random variable X. In Intro to Statistics, it is used to generate moments like the mean and variance and to study probability distributions.

Last updated July 2026

What is the Moment-Generating Function?

The moment-generating function is a way to package a random variable into a single formula: M_X(t)=E[e^{tX}]. In Intro to Statistics, you use it mainly with random variables from probability distributions, especially continuous ones, to pull out moments and compare distributions.

The name makes more sense once you see what it does. A moment is a numerical summary such as the mean, variance, or higher-power averages like E[X^2] and E[X^3]. The MGF gives you those values by taking derivatives with respect to t and evaluating at 0. For example, the first derivative at 0 gives the mean, and the second derivative is part of finding the variance.

The expression e^{tX} may look strange, but it is chosen because exponentials behave nicely under differentiation. That makes the MGF a compact tool for calculations that would be messier if you worked directly from the PDF or CDF every time. If the MGF exists for a distribution near t=0, it can identify that distribution uniquely, which is why it is a strong summary of the random variable.

You usually do not graph an MGF in an intro stats class the way you might graph a PDF or CDF. Instead, you compute it from a known distribution, then use it to get moments or to verify that a transformed random variable matches a familiar distribution. A common pattern is finding the MGF of a standard distribution, then using derivatives at t=0 to check the mean and variance.

One thing to watch is the domain. Not every random variable has an MGF that exists for all t, or even for any interval around 0. In that case, the MGF is not the best tool, and your class may move to another summary method such as the characteristic function or direct use of the PDF/CDF.

Why the Moment-Generating Function matters in Intro to Statistics

The MGF gives you a shortcut for turning a distribution into usable numbers. If a problem asks for the mean, variance, or higher moments of a continuous random variable, the MGF can turn a long integral into a derivative calculation.

It also shows you how distributions can be compared. Two random variables with the same MGF, when the MGF exists in a neighborhood of 0, have the same distribution. That makes the MGF more than a formula, it is a way to recognize when two probability models are really the same.

In Intro to Statistics, this fits into the broader unit on continuous distributions. You already work with PDFs and CDFs to describe probability, but the MGF gives another angle: instead of focusing on area under a curve, you focus on moments and structural properties of the distribution.

You will also see it when independent random variables are added together. MGFs multiply for independent sums, which makes them useful for identifying the distribution of a total, like the sum of repeated measurements or waiting times in a model.

Keep studying Intro to Statistics Unit 5

Official unit cheatsheet

open one-pager

How the Moment-Generating Function connects across the course

Moment

The MGF is built to generate moments. If you take derivatives of the MGF at 0, you recover values like the mean and the second moment, which are the numerical summaries that describe center and spread. If you are asked to move from a distribution to its average behavior, moments are the numbers you are after.

Probability Density Function (PDF)

For a continuous random variable, the PDF is often where the MGF starts, since M_X(t)=E[e^{tX}] is computed using the density. The PDF tells you how probability is distributed across values, while the MGF compresses that information into a form that is easier for differentiation and moment calculations.

Cumulative Distribution Function (CDF)

The CDF and the MGF both summarize a distribution, but they do it in different ways. The CDF gives probabilities up to a cutoff value, which is useful for range questions. The MGF does not replace the CDF, but it is better when the problem is about moments, sums, or identifying a known distribution.

Method of Moments

Method of Moments uses sample moments to estimate parameters, and MGFs are the theoretical side of that idea. If you know the moments of a distribution, you can sometimes match them to a model and solve for unknown parameters. That connection shows up when a class compares sample summaries to a proposed distribution.

Is the Moment-Generating Function on the Intro to Statistics exam?

A quiz problem might give you a distribution and ask you to find its MGF, then use derivatives at t=0 to get the mean or variance. The main move is to write E[e^{tX}] as an integral for a continuous random variable, simplify it, and differentiate carefully.

You can also see MGF questions that ask whether two random variables have the same distribution, or whether the sum of independent random variables follows a familiar model. In those problems, you do not just compute algebra, you interpret what the result says about the random variable. If the distribution is one from class, such as a gamma or lognormal setting, the MGF may help connect the formula to the shape and moments you expect.

The Moment-Generating Function vs Characteristic Function

The characteristic function looks almost like an MGF, but it uses i t instead of t inside the exponential. Both summarize a distribution and can be used for theoretical work, but the characteristic function always exists, while the MGF may not. In intro stats, the MGF is usually the one you use for moments when it exists.

Key things to remember about the Moment-Generating Function

  • The moment-generating function is M_X(t)=E[e^{tX}], and it summarizes a random variable in a form that is useful for calculus-based probability work.

  • You get moments by differentiating the MGF and plugging in t=0, which is why it connects directly to the mean and variance.

  • For continuous distributions, the MGF is another way to describe the distribution, alongside the PDF and CDF.

  • MGFs are especially handy when you need the distribution of a sum of independent random variables or want to identify a familiar distribution.

  • Not every random variable has an MGF that exists near t=0, so it is a powerful tool, but not a universal one.

Frequently asked questions about the Moment-Generating Function

What is moment-generating function in Intro to Statistics?

The moment-generating function is M_X(t)=E[e^{tX}] for a random variable X. In Intro to Statistics, it is used to generate moments like the mean and variance and to compare probability distributions. If the MGF exists near t=0, it can uniquely identify the distribution.

How do you find the mean from a moment-generating function?

Take the first derivative of the MGF with respect to t, then plug in t=0. That value is the first moment, which is the mean, E[X]. The second derivative is used for the second moment, which helps when you calculate variance.

Is the moment-generating function the same as the PDF?

No. The PDF shows how probability is spread across values of a continuous random variable, while the MGF is an expected value of e^{tX}. You usually compute the MGF from the PDF, but they serve different jobs in statistics.

Why do statisticians use the MGF instead of working directly with the distribution?

Because it can make moment calculations and sums of independent variables much easier. Instead of doing several separate integrals, you can differentiate once or twice and get the numbers you need. It is especially useful when checking whether a random variable matches a known distribution.

Moment-Generating Function | Intro to Statistics | Fiveable