โ€œํ™•๋ฅ ๊ณผ ํ†ต๊ณ„(MATH230)โ€ ์ˆ˜์—…์—์„œ ๋ฐฐ์šด ๊ฒƒ๊ณผ ๊ณต๋ถ€ํ•œ ๊ฒƒ์„ ์ •๋ฆฌํ•œ ํฌ์ŠคํŠธ์ž…๋‹ˆ๋‹ค. ์ „์ฒด ํฌ์ŠคํŠธ๋Š” Probability and Statistics์—์„œ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค ๐ŸŽฒ

14 minute read

โ€œํ™•๋ฅ ๊ณผ ํ†ต๊ณ„(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)\]
\[\begin{aligned} M_{X+Y}(t) &= M_X(t) \cdot M_Y(t) \quad (X \perp Y) \\ &= (pe^t + q)^n \cdot (pe^t + q)^m \\ &= (pe^t + q)^{n+m} \end{aligned}\]

์œ„์˜ 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)\]
\[\begin{aligned} M_{X+Y}(t) &= M_X(t) \cdot M_Y(t) \quad (X \perp Y) \\ &= \exp \left( \lambda (e^t - 1) \right) \cdot \exp \left( \mu (e^t - 1) \right) \\ &= \exp \left( (\lambda + \mu) (e^t - 1) \right) \end{aligned}\]

์œ„์˜ 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)\]
\[\begin{aligned} M_{X+Y}(t) &= M_X(t) \cdot M_Y(t) \quad (X \perp Y) \\ &= \exp \left( \mu_1 t + \frac{\sigma_1^2 t^2}{2} \right) \cdot \exp \left( \mu_2 t + \frac{\sigma_2^2 t^2}{2} \right) \\ &= \exp \left( (\mu_1 + \mu_2) t + \frac{(\sigma^2 + \sigma_2^2) t^2}{2} \right) \end{aligned}\]

์œ„์˜ 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)\]

์—ฌ๊ธฐ๊นŒ์ง€๊ฐ€ ์ •๊ทœ์ˆ˜์—…์˜ ์ค‘๊ฐ„๊ณ ์‚ฌ ์‹œํ—˜ ๋ฒ”์œ„์ด๋‹ค. ๊ฐœ์ธ์ ์œผ๋กœ ๋…ผ๋ฆฌ๋ฅผ ์ „๊ฐœํ•˜๋Š” ๋ถ€๋ถ„์€ ์‹์„ ์ž˜ ์ •๋ฆฌํ•˜๊ณ , ๋ฌธ์ œ๋ฅผ ์ž˜ ๋ชจ๋ธ๋งํ•˜๋Š” ๋ถ€๋ถ„์„ ์ถฉ๋ถ„ํžˆ ์—ฐ์Šตํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™๋‹ค. ๋‹ค๋งŒ, ๊ฐ ๋ถ„ํฌ์˜ ์ •์˜์™€ ํ˜•ํƒœ๊ฐ€ ์กฐ๊ธˆ์”ฉ ํ—ท๊ฐˆ๋ ค์„œ ์‹œํ—˜ ์ „์— ๋ชจ๋“  ๋ถ„ํฌ๋ฅผ ๋น ์ง์—†์ด ๋‹ค ๊ธฐ์ˆ ํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ๋ฐฑ์ง€(็™ฝ็ด™)์— ์ฒดํฌํ•ด๋ณด๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™๋‹ค.