Moment Generating Functions
Last modified — 02 Dec 2026
By the end of this lecture, students are anticipated to be able to:
Calculate MGFs
Use the MGF to calculate moments
Important
We will not cover/discuss probability generating functions or characteristic functions in this course. We will not discuss:
The moment generating function (MGF) of a random variable \(X\) is defined by \[m_X(t) = \mathbb{E}[e^{tX}].\]
Two lectures ago, we saw that \(\mathbb{E}[\exp(tX)] = \left(1 - \frac{t}{\lambda}\right)^{-\alpha}\) when \(X \sim {\mathrm{Gam}}(\alpha, \lambda)\). (see “Exercise: More Gamma Expectations”). This was actually the moment generating function!
\[ \begin{aligned} m_X(t) &= \mathbb{E}[e^{tX}] \\ &= \int_{0}^{\infty}e^{tx}f_{X}(x)dx \\ &= \left(1 - \frac{t}{\lambda}\right)^{-\alpha}, \quad t <\lambda. \end{aligned} \]
Find the MGF of a \(X\) where \(X \sim {\mathrm{Exp}}(\lambda)\) for \(t < \lambda\).
If \(X\) is a random variable with MGF \(m_X(t)\), and there exists \(s>0\) such that, for all \(t \in (-s, s)\), \(m_X(t)<\infty\).
Then for any integer \(k \ge 1\), \[\mathbb{E}[X^k] = m_X^{(k)}(0) = \left.\frac{\mathsf{d}^k}{\mathsf{d}t^k} m_X(t)\right|_{t=0}.\]
Let \(X \sim {\mathrm{Gam}}(\alpha, \lambda)\) with MGF \(m_X(t) = \left(1 -\frac{t}{\lambda}\right)^{-\alpha}\). Find \(\operatorname{Var}(X)\).
Let \(X \sim \mathcal{N}(\mu, \sigma^2)\). Then,
\[m_X(t) = \mathbb{E}[e^{tX}] = \exp\left(\mu t + \frac{1}{2} \sigma^2 t^2\right).\]
Find \(\mathbb{E}[X]\) and \(\operatorname{Var}(X)\) using the MGF of \(X\).
Let \(X\) and \(Y\) be independent random variables with MGFs \(m_X(t)\) and \(m_Y(t)\), respectively.
Then the MGF of \(X + Y\) is given by \[\begin{aligned} m_{X+Y}(t) &= \mathbb{E}[e^{t(X + Y)}] = \mathbb{E}[e^{tX} e^{tY}] = \mathbb{E}[e^{tX}] \mathbb{E}[e^{tY}] && \text{$X$ and $Y$ are independent} \\ &= m_X(t) m_Y(t). \end{aligned}\]
If \(X\) and \(Y\) are random variables with MGFs \(m_X(t)\) and \(m_Y(t)\), respectively, and there exists \(s > 0\) such that for all \(t \in (-s, s)\), \(m_X(t) = m_Y(t) < \infty\), then \(X\) and \(Y\) have the same distribution.
This is a very important result, as it allows us to identify the distribution of a random variable by finding its MGF.
Let \(X_1, \dots, X_n\) be independent identically distributed (i.i.d.) random variables with \(X_i \sim \mathcal{N}(\mu, \sigma^2)\) for all \(i\).
Note that \(m_{X_i}(t) = \exp\left(\mu t + \frac{1}{2} \sigma^2 t^2\right)\) for \(i = 1, \ldots, n\).
Find the distribution of \(\overline{X} = \frac{1}{n}\sum_{i=1}^n X_i\) using MGFs.
The previous theorems assume independence. Consider the scenario where \(X\) and \(Y\) are not independent.
Let \(X\) and \(Y\) be random variables that are not necessarily independent.
Then the MGF of \(h(X, Y)\) is given by \[ \begin{aligned} m_{h(X,Y)}(t) &= \mathbb{E}[e^{t\times h(X,Y)}] \end{aligned} \]
For example, if we were interested in the MGF of \(X + Y\), we would solve \(m_{X+Y}(t) = \mathbb{E}[e^{t(X+Y)}]\) directly.
Let \(X\) and \(Y\) have joint pmf:
| \(\mathbb{P}(X,Y)\) | 0 | 1 |
|---|---|---|
| 0 | 0.1 | 0.4 |
| 1 | 0.4 | 0.1 |
and 0 otherwise.
Find the MGF of \(Z = X + Y\).
Find \(\mathbb{E}[Z]\) using the MGF.
Checkpoint 6 is on Friday Nov 27 (on Section 3.3 - Variance, Covariance, Correlation)
Checkpoint 7 is on Friday Dec 4
Stat 302 - Winter 2025/26