Expectation of Gaussian Distribution

From ProofWiki
Jump to navigation Jump to search

Theorem

Let $X \sim N \paren {\mu, \sigma^2}$ for some $\mu \in \R, \sigma \in \R_{> 0}$, where $N$ is the Gaussian distribution.

Then:

$\expect X = \mu$


Proof 1

From the definition of the Gaussian distribution, $X$ has probability density function:

$f_X \left({x}\right) = \dfrac 1 {\sigma \sqrt{2 \pi} } \, \exp \left({-\dfrac { \left({x - \mu}\right)^2} {2 \sigma^2} }\right)$

From the definition of the expected value of a continuous random variable:

$\displaystyle \mathbb E \left[{X}\right] = \int_{-\infty}^\infty x f_X \left({x}\right) \rd x$

So:

\(\ds \mathbb E \left[{X}\right]\) \(=\) \(\ds \frac 1 { \sigma \sqrt{2 \pi} } \int_{-\infty}^\infty x \exp \left({- \frac {\left({x - \mu}\right)^2} {2 \sigma^2} }\right) \rd x\)
\(\ds \) \(=\) \(\ds \frac {\sqrt 2 \sigma} { \sigma \sqrt{2 \pi} } \int_{-\infty}^\infty \left({\sqrt 2 \sigma t + \mu}\right) \exp \left({-t^2}\right) \rd t\) substituting $t = \dfrac {x - \mu} {\sqrt 2 \sigma}$
\(\ds \) \(=\) \(\ds \frac 1 {\sqrt \pi} \left({\sqrt 2 \sigma \int_{-\infty}^\infty t \exp \left({-t^2}\right) \rd t + \mu \int_{-\infty}^\infty \exp \left({-t^2}\right) \rd t}\right)\)
\(\ds \) \(=\) \(\ds \frac 1 {\sqrt \pi} \left({\sqrt 2 \sigma \left[{-\frac 1 2 \exp \left({-t^2}\right)}\right]_{-\infty}^\infty + \mu \sqrt \pi}\right)\) Fundamental Theorem of Calculus, Gaussian Integral
\(\ds \) \(=\) \(\ds \frac {\mu \sqrt \pi} {\sqrt \pi}\) Exponential Tends to Zero and Infinity
\(\ds \) \(=\) \(\ds \mu\)

$\blacksquare$


Proof 2

By Moment Generating Function of Gaussian Distribution, the moment generating function of $X$ is given by:

$\map {M_X} t = \map \exp {\mu t + \dfrac 1 2 \sigma^2 t^2}$

From Moment in terms of Moment Generating Function:

$\expect X = \map {M'_X} 0$

We have:

\(\ds \map {M_X'} t\) \(=\) \(\ds \frac \d {\d t} \map \exp {\mu t + \dfrac 1 2 \sigma^2 t^2}\)
\(\ds \) \(=\) \(\ds \map {\frac \d {\d t} } {\mu t + \frac 1 2 \sigma^2 t^2} \frac \d {\map \d {\mu t + \dfrac 1 2 \sigma^2 t^2} } \map \exp {\mu t + \dfrac 1 2 \sigma^2 t^2}\) Chain Rule for Derivatives
\(\ds \) \(=\) \(\ds \paren {\mu + \sigma^2 t} \map \exp {\mu t + \dfrac 1 2 \sigma^2 t^2}\) Derivative of Power, Derivative of Exponential Function

Setting $t = 0$:

\(\ds \map {M_X'} 0\) \(=\) \(\ds \paren {\mu + 0\sigma^2} \map \exp {0\mu + 0 \sigma^2}\)
\(\ds \) \(=\) \(\ds \mu \exp 0\)
\(\ds \) \(=\) \(\ds \mu\) Exponential of Zero

$\blacksquare$