Momemtum Generating Function
โํ๋ฅ ๊ณผ ํต๊ณ(MATH230)โ ์์ ์์ ๋ฐฐ์ด ๊ฒ๊ณผ ๊ณต๋ถํ ๊ฒ์ ์ ๋ฆฌํ ํฌ์คํธ์ ๋๋ค. ์ ์ฒด ํฌ์คํธ๋ Probability and Statistics์์ ํ์ธํ์ค ์ ์์ต๋๋ค ๐ฒ
Moment Generating Function
Definition. moment
We call $E[X^k]$ as the <$k$-th moment> of $X$.
Remark.
1. Moments can be infinite.
2. Moments may not be defined.
ํ์ง๋ง, ์ ๊ท ์์ ์์๋ ์์ ์ฌ๋ก๋ค์ ๋ค๋ฃจ์ง๋ ์๋๋ค!
Definition. MGF; Moment Generating Function
The <moment generating function> of $X$ is given by
\[M_X(t) := E[e^{tX}]\]Q. Why is this called the โmomentโ generating function?
A. Because it generates moments!
Note that
\[\frac{d}{dt} e^{tX} = X e^{tX}\]and then,
\[\begin{aligned} \frac{d}{dt} M_X(t) &= \frac{d}{dt} E[e^{tX}] \\ &= E \left[ \frac{d}{dt} e^{tX}\right] \\ &= E \left[ X e^{tX}\right] \end{aligned}\]์์ ์ $\dfrac{d}{dt} M_X(t)$์์ ์ฐ๋ฆฌ๊ฐ $t=0$์ ๋์ ํ๋ค๋ฉด, ์ฐ๋ฆฌ๋ ์์ฝ๊ฒ moment๋ฅผ ์ป์ ์ ์๋ค!
\[\left. \frac{d}{dt} M_X(t) \right|_{t=0} = \left. E \left[ X e^{tX}\right] \right|_{t=0} = E[X]\]๋ง์ฐฌ๊ฐ์ง๋ก
\[\frac{d^k}{dt^k} e^{tX} = \frac{d^{(k-1)}}{dt^{(k-1)}} X e^{tX} = X \frac{d^{(k-1)}}{dt^{(k-1)}} e^{tX} = \cdots = X^k e^{tX}\]์ธ ์ฌ์ค์ ์ด์ฉํ๋ฉด, $k$-th moment $E[X^k]$๋ ์ฝ๊ฒ ๊ตฌํ ์ ์๋ค!!
\[\left. \frac{d^k}{dt^k} M_X(t) \right|_{t=0} = \left. E \left[ X^k e^{tX}\right] \right|_{t=0} = E[X^k]\]MGF Examples
Example.
Let $X \sim \text{BIN}(n, p)$, then find its MGF.
\[\begin{aligned} M_X(t) &= E[e^{tX}] \\ &= \sum_k e^{tk} f(k) \\ &= \sum^n_{k=0} e^{tk} \cdot \binom{n}{k} p^k q^{n-k} \\ &= \sum^n_{k=0} \binom{n}{k} \cdot \left( p \cdot e^t \right)^k q^{n-k} \\ &= \left( p \cdot e^t + q \right)^n \end{aligned}\]์์ MGF๋ฅผ ํตํด ์ง์ $E[X]$๋ฅผ ๊ตฌํด๋ณด๋ฉด,
\[\left. \frac{d}{dt} M_X(t) \right|_{t=0} = \left. n \cdot p \cdot \left( p \cdot e^t + q \right)^{n-1} \right|_{t=0} = np\]Example.
Let $X \sim \text{Poi}(\lambda)$, find its MGF.
\[\begin{aligned} M_X(t) &= E[e^{tX}] \\ &= \sum^{\infty}_{k=0} e^{tk} \cdot e^{-\lambda} \frac{\lambda^{k}}{k!} \\ &= e^{-\lambda} \cdot \sum^{\infty}_{k=0} \frac{\left(e^t \lambda \right)^k}{k!} \\ &= e^{-\lambda} \cdot \exp \left( \lambda e^t\right) = \exp (\lambda(e^t - 1)) \end{aligned}\]์ด๊ฒ ์์ MGF๋ฅผ ์ด์ฉํด $E[X]$๋ฅผ ๊ตฌํด๋ณด์!
\[\begin{aligned} \left. \frac{d}{dt} \exp (\lambda(e^t - 1)) \right|_{t=0} &= \left. \left( \frac{d}{dt} \lambda(e^t - 1) \right) \cdot \exp (\lambda(e^t - 1)) \right|_{t=0} \\ &= \left. \lambda \cdot \exp (\lambda(e^t - 1)) \right|_{t=0} \\ &= \lambda \cdot \exp (\lambda(1 - 1)) = \lambda \cdot 1 \\ &= \lambda \end{aligned}\]Example.
Let $X \sim \text{NegBIN}(k, p)$, find its MGF.
\[\begin{aligned} M_X(t) &= \sum^{\infty}_{x=k} e^{tx} \cdot \binom{x-1}{k-1} p^{k} q^{x-k} \\ &= \left(\frac{p}{q}\right)^k \cdot \sum^{\infty}_{x=k} \binom{x-1}{k-1} \left( e^t q \right)^{x} \\ \end{aligned}\]์์ ์์์ $y = x-k$๋ฅผ ๋์ ํ์.
\[\begin{aligned} \left(\frac{p}{q}\right)^k \cdot \sum^{\infty}_{x=k} \binom{x-1}{k-1} \left( e^t q \right)^{x} &= \left(\frac{p}{q}\right)^k \cdot \sum^{\infty}_{y=0} \binom{y+k-1}{k-1} \left( e^t q \right)^{y+k} \\ &= \left(\frac{p}{q}\right)^k \cdot \left( e^t q \right)^k \sum^{\infty}_{y=0} \binom{y+k-1}{k-1} \left( e^t q \right)^y \\ &= (p \cdot e^t)^k \cdot \sum^{\infty}_{y=0} \binom{y+k-1}{k-1} \left( e^t q \right)^y \end{aligned}\]์ด๋, $\displaystyle \binom{y+k-1}{k-1}$์ ๋ํด ์๋์ ์์ด ์ฑ๋ฆฝํ๋ค.
\[\binom{y+k-1}{k-1} = \left( -1 \right)^y \cdot \binom{-k}{y}\]์์ ์์ ๋์ ํ๋ฉด,
\[\begin{aligned} (p \cdot e^t)^k \cdot \sum^{\infty}_{y=0} \binom{y+k-1}{k-1} \left( e^t q \right)^y &= (p \cdot e^t)^k \cdot \sum^{\infty}_{y=0} \left( -1 \right)^y \cdot \binom{-k}{y} \left( e^t q \right)^y \\ &= (p \cdot e^t)^k \cdot \left( 1 - q\cdot e^t \right)^{-k} \\ &= \left( \frac{p \cdot e^t}{1 - q\cdot e^t} \right)^k \qquad \text{for} \quad 1 - q \cdot e^{t} > 0 \end{aligned}\]๋ง์ฝ $k=1$์ด๋ผ๋ฉด, RV $X$๊ฐ Geometric Distribution์ ๋ฐ๋ฅด๊ฒ ๋๋ฏ๋ก, Geo์ MGF๋ ์๋์ ๊ฐ๋ค๋ ์ฌ์ค์ ์ ์ ์๋ค.
\[M_X (t) = \frac{p \cdot e^t}{1 - q\cdot e^t} \qquad \text{for} \quad 1 - q \cdot e^{t} > 0\]Example.
Let $X \sim \text{Gamma}(\alpha, \beta)$, find its MGF.
์ฐ๋ฆฌ๋ ๋ ผ์์ ํธ์๋ฅผ ์ํด $Y \sim \text{Gamma}(\alpha, 1)$๋ฅผ ๋จผ์ ์ดํด๋ณผ ๊ฒ์ด๋ค. ($Y$์ ๋ํด $\beta Y = X$์ด๊ธฐ ๋๋ฌธ!)
\[\begin{aligned} M_Y(t) &= E[e^{tY}] \\ &= \int^{\infty}_0 e^{tx} \cdot \frac{1}{\Gamma(\alpha)} \cdot x^{\alpha-1} e^{-x} \; dx\\ &= \frac{1}{\Gamma(\alpha)} \cdot \int^{\infty}_0 x^{\alpha-1}\cdot e^{-(1-t)x} \; dx \\ \end{aligned}\]์ด๋, ์์ ์์์ $\beta = \dfrac{1}{1-t}$๋ก ๋๋ฉด, ์ ๋ ๊ณผ์ ์ค์ ๊ฐ๋ง ๋ถํฌ์ ๋ํ ์ ๋ถ์ด ์๊ธฐ ๋๋ฌธ์ ์์ฝ๊ฒ ๊ณผ์ ์ ์งํํ ์ ์๋ค.
\[\begin{aligned} \frac{1}{\Gamma(\alpha)} \cdot \int^{\infty}_0 x^{\alpha-1}\cdot e^{-(1-t)x} \; dx &= \frac{1}{\Gamma(\alpha)} \cdot \int^{\infty}_0 x^{\alpha-1}\cdot e^{-\frac{x}{1/(1-t)}} \; dx \\ &= \frac{1}{(1-t)^{\alpha}} \cdot \cancelto{1}{\int^{\infty}_0 \frac{1}{\Gamma(\alpha) \cdot \frac{1}{(1-t)^{\alpha}}} \cdot x^{\alpha-1} \cdot e^{-\frac{x}{1/(1-t)}} \; dx} \\ &= \frac{1}{(1-t)^{\alpha}} \qquad \text{for} \quad t < 1 \end{aligned}\]์ด์ , $X = \beta Y$์ ๊ด๊ณ์์ ์ด์ฉํด $X$์ MGF๋ฅผ ๊ตฌํ๋ฉด
\[\begin{aligned} M_X(t) = E[e^{tX}] = E[e^{t\beta Y}] = \frac{1}{(1-\beta t)^{\alpha}} \qquad \text{for} \quad \beta t < 1 \quad (=t < \lambda) \end{aligned}\]์ด์ ์์ ์์ ์ด์ฉํด Exponential Distribution์ MGF๋ ๊ตฌํ ์ ์๋๋ฐ,
\[M_X(t) = \frac{1}{1-\beta t} \qquad \text{for} \quad \beta t < 1 \quad (=t < \lambda)\]Example.
Let $Z \sim N(0, 1)$, then find its MGF.
\[\begin{aligned} M_Z (t) &= E[e^{tZ}] \\ &= \int^{\infty}_{-\infty} e^{tx} \cdot \frac{1}{\sqrt{2\pi}} e^{-\frac{x^2}{2}} \; dx \\ &= \int^{\infty}_{-\infty} \frac{1}{\sqrt{2\pi}} \cdot e^{tx} \cdot e^{-\frac{(x-t)^2 + 2xt - t^2}{2}} \; dx \\ &= \int^{\infty}_{-\infty} \frac{1}{\sqrt{2\pi}} \cdot e^{-\frac{(x-t)^2}{2}} \cdot e^{tx} \cdot e^{-\frac{2xt-t^2}{2}} \; dx \\ &= e^{t^2 / 2} \cdot \cancelto{1}{\int^{\infty}_{-\infty} \frac{1}{\sqrt{2\pi}} \cdot e^{-\frac{(x-t)^2}{2}} \; dx} \\ &= e^{t^2 / 2} \end{aligned}\]์ด์ $X \sim N(\mu, \sigma^2)$์ผ๋ก ์ผ๋ฐํํ๋ฉด, $X = \sigma Z + \mu$์ด๋ฏ๋ก
\[\begin{aligned} M_X(t) &= E[e^{tX}] = E[e^{\sigma t z + \mu t}] \\ &= e^{\mu t} \cdot E[e^{\sigma t z}] \\ &= e^{\mu t} \cdot e^{\sigma^2t^2 / 2} \\ &= \exp \left( \mu t + \frac{\sigma^2 t^2}{2}\right) \end{aligned}\]Remark.
If $X$ has the mgf $M_X(t)$, then $Y = aX + b$ has the mgf
\[M_Y (t) = e^{bt} \cdot M_X(at)\]Uniqueness Theorem for MGF
mgf๋ ๋ฏธ๋ถ๋ง ํ๋ฉด momentum์ ์ฝ๊ฒ ๊ตฌํ ์ ์๋ค๋ ์ฅ์ ๋ ์์ง๋ง, <Uniqueness Theorem>์ด๋ผ๋ ์๋์ ์ ๋ฆฌ์ ์ํด ๋ RV์ด ๋์ผํ ๋ถํฌ๋ฅผ ๊ฐ์ง๋ ๊ฒ์ ๋ณด์ฅํ๋ ์กฐ๊ฑด์ด ๋๊ธฐ๋ ํ๋ค.
Theorem. Uniqueness Theorem
If $M_X(t) = M_Y(t)$ for all $t \in (-\delta, \delta)$ for some $\delta > 0$,
then $X$ and $Y$ have the same distribution.
๋ฐ๋ผ์, ๋ RV์ด ๋์ผํ ๋ถํฌ๋ฅผ ๊ฐ์ง๋์ง ํ์ธํ๋ ค๋ฉด, ๋ RV์ mgf๋ฅผ ํ์ธํด๋ณด๋ฉด ๋๋ค!
Example.
Q. Let $X$ be a random variable with $M_X(t) = \dfrac{1}{1-2t}$ for $t < \frac{1}{2}$. What is the distribution of $X$?
A. $X \sim \text{Exp}(\lambda = 2)$
Example.
Q. How about $M_X(t) = \dfrac{1}{2} e^t + \dfrac{1}{2} e^{-t}$ for $t \in \mathbb{R}$?
A.
\[\begin{aligned} M_X(t) &= E[e^{tX}] \\ &= \sum e^{tX} \cdot f(x) \\ &= \sum_x e^{tX} \cdot P(X = x) \\ &= e^{1\cdot x} \cdot P(X = 1) + e^{-1\cdot x} \cdot P(X = -1) \\ &= e^{x} \cdot \frac{1}{2} + e^{-x} \cdot \frac{1}{2} \end{aligned}\]์ด๋, ์๋์ ๊ฐ์ ๋ถํฌ๋ฅผ ๊ฐ์ง๋ RV $Y$๊ฐ ์๋ค๊ณ ๊ฐ์ ํ์.
\[f(y) := \begin{cases} 1/2 & \text{if} \quad x \pm 1 \\ 0 & \text{else} \end{cases}\]์ด๋, $Y$์ mgf๋ $M_Y(t) = \dfrac{1}{2}e^t + \dfrac{1}{2}e^{-t}$์ด๋ค.
์์์ ์ธ๊ธํ <Uniqueness Theorem for MGF>์ ์ํด $X$์ $Y$๋ ๋์ผํ ๋ถํฌ๋ฅผ ๊ฐ์ง๋ค. $\blacksquare$
์คํฌ๋ฅผ ์กฐ๊ธ ํ์๋ฉด, <Uniqueness Theorem of MGF>๋ ๋์ค์ <CLT; Central Limit Theorem>์ ์ฆ๋ช ํ ๋, ์ค์ํ๊ฒ ์ฌ์ฉ๋๋ค.
๐ Proof of CLT
MGF with Independence
If $X \perp Y$, then
\[M_{X+Y} (t) = M_X(t) \cdot M_Y(t)\]In general, if $X_1, X_2, \dots, X_n$ are independent,, then
\[M_{X_1 + \cdots + X_n}(t) = M_{X_1} (t) + \cdots + M_{X_n} (t) = \sum^n_{i=1} M_{X_i} (t)\]Example. Tow Independent BIN
Let $X \sim \text{BIN}(n, p)$ and $Y \sim \text{BIN}(m, p)$, and $X \perp Y$.
Then,
\[X+Y \sim \text{BIN}(n+m, p)\]์์ mgf๋ ๊ณง $\text{BIN}(n+m, p)$์ mgf์ ๋์ผํ๋ค. $\blacksquare$
Example. Two Independent Poi
Let $X \sim \text{Poi}(\lambda)$ and $Y \sim \text{Poi}(\mu)$, and $X \perp Y$.
Then,
\[X+Y \sim \text{Poi}(\lambda + \mu)\]์์ mgf๋ ๊ณง $\text{Poi}(\lambda + \mu)$์ mgf์ ๋์ผํ๋ค. $\blacksquare$
Example. Two Independent NegBIN
Let $X \sim \text{NegBIN}(r_1, p)$ and $Y \sim \text{NegBIN}(r_2, p)$, and $X \perp Y$.
Then,
\[X+Y \sim \text{NegBIN}(r_1 + r_2, p)\]Example. Two Independent Normal
Let $X \sim N(\mu_1, \sigma_1^2)$ and $Y \sim N(\mu_2, \sigma_2^2)$, and $X \perp Y$.
Then,
\[X+Y \sim N(\mu_1 + \mu_2, \sigma_1^2 + \sigma_2^2)\]์์ mgf๋ ๊ณง $N(\mu_1 + \mu_2, \sigma_1^2 + \sigma_2^2)$์ mgf์ ๋์ผํ๋ค. $\blacksquare$
Example. Two Independent Gamma
Let $X \sim \text{Gamma}(\alpha_1, \beta)$ and $Y \sim \text{Gamma}(\alpha_2, \beta)$, and $X \perp Y$.
Then,
\[X+Y \sim \text{Gamma}(\alpha_1 + \alpha_2, \beta)\]์์ ์ฌ์ค์ ์ด์ฉํ๋ฉด, $\text{Exp}$์ $\chi^2$์ ๋ํด์๋ two independent ๊ฒฝ์ฐ๋ฅผ ๋ ผํ ์ ์๋ค!
1. If $X \sim \text{Exp}(\beta)$, $Y \sim \text{Exp}(\beta)$ and $X \perp Y$. Then,
\[X + Y \sim \text{Gamma}(2, \beta)\]โป $\text{Exp}(\beta) = \text{Gamma}(1, \beta)$
2. If $X \sim \chi^2(n)$, $Y \sim \chi^2(m)$ and $X \perp Y$. Then,
\[X + Y \sim \chi^2(n+m)\]โป $\chi^2(n) = \text{Gamma}(n/2, 2)$
Example.
Let $X \sim \text{Exp}(\lambda)$, $Y \sim \text{Exp}(\mu)$ and $X \perp Y$.
Then,
\[Z = \min(X, Y) \sim \text{Exp}(\lambda + \mu)\]์ฌ๊ธฐ๊น์ง๊ฐ ์ ๊ท์์ ์ ์ค๊ฐ๊ณ ์ฌ ์ํ ๋ฒ์์ด๋ค. ๊ฐ์ธ์ ์ผ๋ก ๋ ผ๋ฆฌ๋ฅผ ์ ๊ฐํ๋ ๋ถ๋ถ์ ์์ ์ ์ ๋ฆฌํ๊ณ , ๋ฌธ์ ๋ฅผ ์ ๋ชจ๋ธ๋งํ๋ ๋ถ๋ถ์ ์ถฉ๋ถํ ์ฐ์ตํ๋ฉด ๋ ๊ฒ ๊ฐ๋ค. ๋ค๋ง, ๊ฐ ๋ถํฌ์ ์ ์์ ํํ๊ฐ ์กฐ๊ธ์ฉ ํท๊ฐ๋ ค์ ์ํ ์ ์ ๋ชจ๋ ๋ถํฌ๋ฅผ ๋น ์ง์์ด ๋ค ๊ธฐ์ ํ ์ ์๋์ง ๋ฐฑ์ง(็ฝ็ด)์ ์ฒดํฌํด๋ณด๋ฉด ์ข์ ๊ฒ ๊ฐ๋ค.