# 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:
$\displaystyle \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:
$\displaystyle \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 $\displaystyle N(\mu, \sigma^2)$ is to find the moment for a standard normal $\displaystyle N(0,1)$ and then use the formula for the linear transformation of a moment. Given $\displaystyle (\Omega, F, P)$, we have a probability space.

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

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

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

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

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

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

Recalling that $\displaystyle M_y (s) = e^{sb} M_x (sa)$ from our lemma, we have $\displaystyle 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 $\displaystyle t$ instead of $\displaystyle s$ but $\displaystyle 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 $\displaystyle N(\mu, \sigma^2)$ is to find the moment for a standard normal $\displaystyle N(0,1)$ and then use the formula for the linear transformation of a moment. Given $\displaystyle (\Omega, F, P)$, we have a probability space.

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

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

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

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

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

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

Recalling that $\displaystyle M_y (s) = e^{sb} M_x (sa)$ from our lemma, we have $\displaystyle 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 $\displaystyle t$ instead of $\displaystyle s$ but $\displaystyle 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. $\displaystyle \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.