27. Moment Generating Function
本章主题(附录):矩母函数(MGF)。 随机变量 \(X\) 的矩母函数 \(M_X(t)\equiv\mathbb E[e^{tX}]\)。两条命题:命题 27.1 \(X\) 的 \(k\) 阶矩等于 \(M_X(t)\) 对 \(t\) 的 \(k\) 阶导数在 \(t=0\) 处取值——由 \(e^{tx}\) 的 Taylor 展开逐项取期望即得。命题 27.2 若 \(X\sim\mathcal N(\mu,\sigma^2)\),则 \(M_X(t)=e^{\mu t+\frac12\sigma^2t^2}\)——由高斯积分配方得到。本章为全书附录,提供前面章节反复用到的工具。
Chapter theme (Appendix): the moment generating function (MGF). The MGF of a random variable \(X\) is \(M_X(t)\equiv\mathbb E[e^{tX}]\). Two propositions: Proposition 27.1 the \(k\)th moment of \(X\) equals the \(k\)th derivative of \(M_X(t)\) with respect to \(t\) evaluated at \(t=0\) — obtained by taking term-by-term expectations of the Taylor expansion of \(e^{tx}\). Proposition 27.2 if \(X\sim\mathcal N(\mu,\sigma^2)\), then \(M_X(t)=e^{\mu t+\frac12\sigma^2t^2}\) — obtained by completing the square in the Gaussian integral. This chapter is the book's appendix, providing a tool used repeatedly in earlier chapters.
27.1 Definition
定义 27.1(矩母函数). 随机变量 \(X\) 的矩母函数为
$$M_X(t)\equiv\mathbb E\!\left[e^{tX}\right]\quad\text{for } t\in\mathbb R$$
Definition 27.1 (Moment Generating Function). The moment generating function of a random variable \(X\) is
$$M_X(t)\equiv\mathbb E\!\left[e^{tX}\right]\quad\text{for } t\in\mathbb R$$
27.2 Generating the Moments
命题 27.1 \(X\) 的 \(k\) 阶矩(即 \(\mathbb E[X^k]\),\(k\in\mathbb N_+\))是 \(M_X(t)\) 对 \(t\) 的 \(k\) 阶导数在 \(t=0\) 处的取值: $$\mathbb E\!\left[X^k\right]=\left.\frac{d^kM_X(t)}{(dt)^k}\right|_{t=0}$$
证明(命题 27.1) 考虑 \(e^{tx}\) 的 Taylor 展开:
$$e^{tx}=1+tx+\frac{(tx)^2}{2!}+\frac{(tx)^3}{3!}+\cdots+\frac{(tx)^k}{k!}+\cdots$$
于是
$$M_X(t)=\mathbb E\!\left[e^{tX}\right]=\mathbb E\!\left[1+tX+\frac{(tX)^2}{2!}+\cdots+\frac{(tX)^k}{k!}+\cdots\right]=1+t\,\mathbb E[X]+\frac{t^2}{2!}\mathbb E\!\left[X^2\right]+\frac{t^3}{3!}\mathbb E\!\left[X^3\right]+\cdots+\frac{t^k}{k!}\mathbb E\!\left[X^k\right]+\cdots$$
这意味着
$$\left.\frac{d^kM_X(t)}{(dt)^k}\right|_{t=0}=\left.\left(\mathbb E\!\left[X^k\right]+t\,\mathbb E\!\left[X^{k+1}\right]+\frac{t^2}{2!}\mathbb E\!\left[X^{k+2}\right]+\cdots\right)\right|_{t=0}=\mathbb E\!\left[X^k\right]\quad\blacksquare$$
直观上,\(M_X(t)\) 把 \(X\) 的所有矩「打包」进一个函数:在 \(t=0\) 处求各阶导数即可逐一「取出」各阶矩。
Proposition 27.1 The \(k\)th moment of \(X\) (i.e. \(\mathbb E[X^k]\), \(k\in\mathbb N_+\)) is the \(k\)th derivative of \(M_X(t)\) with respect to \(t\) evaluated at \(t=0\): $$\mathbb E\!\left[X^k\right]=\left.\frac{d^kM_X(t)}{(dt)^k}\right|_{t=0}$$
Proof (Proposition 27.1) Consider the Taylor expansion of \(e^{tx}\):
$$e^{tx}=1+tx+\frac{(tx)^2}{2!}+\frac{(tx)^3}{3!}+\cdots+\frac{(tx)^k}{k!}+\cdots$$
So we have
$$M_X(t)=\mathbb E\!\left[e^{tX}\right]=\mathbb E\!\left[1+tX+\frac{(tX)^2}{2!}+\cdots+\frac{(tX)^k}{k!}+\cdots\right]=1+t\,\mathbb E[X]+\frac{t^2}{2!}\mathbb E\!\left[X^2\right]+\frac{t^3}{3!}\mathbb E\!\left[X^3\right]+\cdots+\frac{t^k}{k!}\mathbb E\!\left[X^k\right]+\cdots$$
which implies that
$$\left.\frac{d^kM_X(t)}{(dt)^k}\right|_{t=0}=\left.\left(\mathbb E\!\left[X^k\right]+t\,\mathbb E\!\left[X^{k+1}\right]+\frac{t^2}{2!}\mathbb E\!\left[X^{k+2}\right]+\cdots\right)\right|_{t=0}=\mathbb E\!\left[X^k\right]\quad\blacksquare$$
Intuitively, \(M_X(t)\) "packs" all the moments of \(X\) into one function: differentiating at \(t=0\) "extracts" each moment in turn.
27.3 The Normal Distribution
命题 27.2 若 \(X\sim\mathcal N(\mu,\sigma^2)\),则 $$M_X(t)=e^{\mu t+\frac12\sigma^2t^2}$$
证明(命题 27.2) 代入正态密度并配方:
$$M_X(t)=\mathbb E\!\left[e^{tX}\right]=\int_{\mathbb R}\frac{1}{\sqrt{2\pi\sigma^2}}\,e^{-\frac12\left(\frac{x-\mu}{\sigma}\right)^2}\cdot e^{tx}\,dx$$
把指数合并、对 \(x\) 配方(凑出新的高斯核),多余项 \(\frac{t^2\sigma^2}{2}+\mu t\) 提到积分外:
$$M_X(t)=\int_{\mathbb R}\frac{1}{\sqrt{2\pi\sigma^2}}\,e^{-\frac12\left(\frac{\left(x-\mu-t\sigma^2\right)^2}{\sigma^2}\right)}\cdot e^{\frac{t^2\sigma^2}{2}+\mu t}\,dx$$
括号内积分是均值 \(\mu+t\sigma^2\)、方差 \(\sigma^2\) 的正态密度的全积分,等于 \(1\),故
$$M_X(t)=e^{\mu t+\frac12\sigma^2t^2}\quad\blacksquare$$
特例:标准正态 \(X\sim\mathcal N(0,1)\) 时 \(M_X(t)=e^{\frac12t^2}\)。由命题 27.1 求导可得各阶矩,例如 \(\mathbb E[X]=\mu\)、\(\mathbb E[X^2]=\mu^2+\sigma^2\)(故 \(\mathrm{Var}(X)=\sigma^2\))。
Proposition 27.2 If \(X\sim\mathcal N(\mu,\sigma^2)\), then $$M_X(t)=e^{\mu t+\frac12\sigma^2t^2}$$
Proof (Proposition 27.2) Substitute the normal density and complete the square:
$$M_X(t)=\mathbb E\!\left[e^{tX}\right]=\int_{\mathbb R}\frac{1}{\sqrt{2\pi\sigma^2}}\,e^{-\frac12\left(\frac{x-\mu}{\sigma}\right)^2}\cdot e^{tx}\,dx$$
Merge the exponents and complete the square in \(x\) (forming a new Gaussian kernel), pulling the leftover term \(\frac{t^2\sigma^2}{2}+\mu t\) outside the integral:
$$M_X(t)=\int_{\mathbb R}\frac{1}{\sqrt{2\pi\sigma^2}}\,e^{-\frac12\left(\frac{\left(x-\mu-t\sigma^2\right)^2}{\sigma^2}\right)}\cdot e^{\frac{t^2\sigma^2}{2}+\mu t}\,dx$$
The integral in the bracket is the full integral of a normal density with mean \(\mu+t\sigma^2\) and variance \(\sigma^2\), which equals \(1\), so
$$M_X(t)=e^{\mu t+\frac12\sigma^2t^2}\quad\blacksquare$$
Special case: for the standard normal \(X\sim\mathcal N(0,1)\), \(M_X(t)=e^{\frac12t^2}\). By Proposition 27.1, differentiating yields the moments, e.g. \(\mathbb E[X]=\mu\), \(\mathbb E[X^2]=\mu^2+\sigma^2\) (so \(\mathrm{Var}(X)=\sigma^2\)).
(全书完。Corporate Finance 共 27 章、七部分至此全部完成。)
(End of the book. All 27 chapters and seven parts of Corporate Finance are now complete.)