# Thread: Deriving MGF of Gaussian distribution

1. ## Deriving MGF of Gaussian distribution

Hi there,
I'm revising at the moment for a stats exam in about a week's time and I'm having trouble deriving the MGF of the Normal distribution.

I know that i should get:
$
\exp\left(\mu t +\frac{t^2 \cdot \sigma^2}{2} \right)$

but i just can't seem to get my integration to work.

Any help would be greatly appreciated!

2. Originally Posted by Eight^squared
Hi there,
I'm revising at the moment for a stats exam in about a week's time and I'm having trouble deriving the MGF of the Normal distribution.

I know that i should get:
$
\exp\left(\mu t +\frac{t^2 \cdot \sigma^2}{2} \right)$

but i just can't seem to get my integration to work.

Any help would be greatly appreciated!
The easiest method to derive the moment-generating function of a general normal distribution $N(\mu, \sigma^2)$ is to find the moment for a standard normal $N(0,1)$ and then use the formula for the linear transformation of a moment. Given $(\Omega, F, P)$, we have a probability space.

Lemma: Let $X: \Omega \longrightarrow R$ be an absolutely continuous random variable whose moment-generating function is $M_x (s)$. Then if $Y = aX +b$, then $M_y (s) = e^{sb} M_x (sa)$

Proof: Let a second random variable $Y = aX + b$. Then the moment generating function for $Y$ is $M_y (s) = E(e^{sY})$
$= E(e^{s(aX+b)})$
$= E(e^{saX+sb})$
$= E(e^{saX} e^{sb})$
$= e^{sb} E(e^{saX})$
$= e^{sb} M_x (sa)$

Therefore, if $Y = aX +b$, then $M_y (s) = e^{sb} M_x (sa)$ - this completes the lemma.

Consider $X$, which is standard normally distributed with mean 0 and variance 1, so that $f_x (x) = \frac{1}{\sqrt{2 \pi}} e^{-x^2/2}$

The moment generating function for $X$ is calculated by $M_x (s) = E(e^{sx})$
$= \int_{-\infty}^{\infty} e^{sx} \frac{1}{\sqrt{2 \pi}} e^{-x^2/2}$
$= \int_{-\infty}^{\infty} \frac{1}{\sqrt{2 \pi}} e^{sx -x^2/2}$
$= \int_{-\infty}^{\infty} \frac{1}{\sqrt{2 \pi}} e^{- \frac{1}{2} ((x-s)^2 - s^2)}$
$= e^{s^2/2} \int_{-\infty}^{\infty} \frac{1}{\sqrt{2 \pi}} e^{- \frac{1}{2} (x-s)^2}$
$= e^{s^2/2}$

Finally, consider $Y$, which is normally distributed with mean $\mu$ and variance $\sigma$, so that $Y = aX +b = \sigma X + \mu$

Recalling that $M_y (s) = e^{sb} M_x (sa)$ from our lemma, we have $M_y (s) = e^{s \mu} M_x (s \sigma) = e^{s \mu} e^{s^2 \sigma^2/2} = e^{s \mu + s^2 \sigma^2/2} \qquad QED$

Sorry, I know that you wanted the variables in terms of $t$ instead of $s$ but $s$ is the convention that I am used to, haha...

3. Originally Posted by Last_Singularity
The easiest method to derive the moment-generating function of a general normal distribution $N(\mu, \sigma^2)$ is to find the moment for a standard normal $N(0,1)$ and then use the formula for the linear transformation of a moment. Given $(\Omega, F, P)$, we have a probability space.

Lemma: Let $X: \Omega \longrightarrow R$ be an absolutely continuous random variable whose moment-generating function is $M_x (s)$. Then if $Y = aX +b$, then $M_y (s) = e^{sb} M_x (sa)$

Proof: Let a second random variable $Y = aX + b$. Then the moment generating function for $Y$ is $M_y (s) = E(e^{sY})$
$= E(e^{s(aX+b)})$
$= E(e^{saX+sb})$
$= E(e^{saX} e^{sb})$
$= e^{sb} E(e^{saX})$
$= e^{sb} M_x (sa)$

Therefore, if $Y = aX +b$, then $M_y (s) = e^{sb} M_x (sa)$ - this completes the lemma.

Consider $X$, which is standard normally distributed with mean 0 and variance 1, so that $f_x (x) = \frac{1}{\sqrt{2 \pi}} e^{-x^2/2}$

The moment generating function for $X$ is calculated by $M_x (s) = E(e^{sx})$
$= \int_{-\infty}^{\infty} e^{sx} \frac{1}{\sqrt{2 \pi}} e^{-x^2/2}$
$= \int_{-\infty}^{\infty} \frac{1}{\sqrt{2 \pi}} e^{sx -x^2/2}$
$= \int_{-\infty}^{\infty} \frac{1}{\sqrt{2 \pi}} e^{- \frac{1}{2} ((x-s)^2 - s^2)}$
$= e^{s^2/2} \int_{-\infty}^{\infty} \frac{1}{\sqrt{2 \pi}} e^{- \frac{1}{2} (x-s)^2}$1
$= e^{s^2/2}$2

Finally, consider $Y$, which is normally distributed with mean $\mu$ and variance $\sigma$, so that $Y = aX +b = \sigma X + \mu$

Recalling that $M_y (s) = e^{sb} M_x (sa)$ from our lemma, we have $M_y (s) = e^{s \mu} M_x (s \sigma) = e^{s \mu} e^{s^2 \sigma^2/2} = e^{s \mu + s^2 \sigma^2/2} \qquad QED$

Sorry, I know that you wanted the variables in terms of $t$ instead of $s$ but $s$ is the convention that I am used to, haha...
Last_Singularity: Thx for the explanation, I do hv still one more small problem and thats how do you go from 1 to 2? (see red above)

4. $\int_{-\infty}^{\infty} \frac{1}{\sqrt{2 \pi}} e^{- \frac{1}{2} (x-s)^2}$
is simply taking the integral of a normal distribution (with variance 1 and its mean at s) across its domain, or finding its area. And recall that the area under any pdf is just one.

,

,

,

,

,

,

,

,

# derive the,gaussian distribution

Click on a term to search for related topics.