1
$\begingroup$

The moment generating function of a normal distribution is defined as

$M(t) = \int_{-\infty}^\infty e^{tx}\frac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2} dx$

In a book I’m reading, the author says that after expanding the exponent and completing the square, the integral can be expressed as

$M(t) = \frac{e^{\mu t + \frac{1}{2}\sigma^2 t^2}}{\sqrt{2\pi\sigma^2}} \int_{-\infty}^\infty e^{-\frac{1}{2}(\frac{x-\mu -\sigma^2t}{\sigma})^2} dx $

This is the integral of a normal distribution with mean $\mu + \sigma^2t$ and variance $\sigma^2$ scaled by some factor. Therefore

$M(t)=e^{\mu t + \frac{1}{2}\sigma^2t^2}$.

I am stuck trying to complete the square after expanding the exponent. How does the author get to the second expression?

$\endgroup$
2
  • 1
    $\begingroup$ So what do you get when you expand the exponent and then extract $e^{\mu t + \frac{1}{2}\sigma^2 t^2}$ ? $\endgroup$
    – Henry
    Commented Jul 5, 2021 at 13:30
  • 1
    $\begingroup$ Essentially, can you show $tx-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2 =\mu t + \frac{1}{2}\sigma^2 t^2 - \frac{1}{2}\left(\frac{x-\mu -\sigma^2 t}{\sigma}\right)^2$ ? $\endgroup$
    – Henry
    Commented Jul 5, 2021 at 13:34

1 Answer 1

3
$\begingroup$

Another way to derive the mgf of a ${\cal N}(\mu,\sigma^2)$ distributed random variable, without doing tedious calculations, is to start with the mfg of a standard normal distributed random variable. Completing the square is not so difficult in this case.

Let $Z \sim {\cal N}(0,1)$, then the mgf is given by: \begin{align} m_Z(t)&=E(\exp(zt)) \\ &=\int_{-\infty}^{\infty}e^{zt}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}z^2} \mathrm{d}z \\ &=\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{zt-\frac{1}{2}z^2} \mathrm{d}z \\ &=\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}z^2+zt-\frac{1}{2}t^2+\frac{1}{2}t^2} \mathrm{d}z \\ &=\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(z-t)^2+\frac{1}{2}t^2} \mathrm{d}z \\ &=\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(z-t)^2}e^{\frac{1}{2}t^2} \mathrm{d}z \\ &=e^{\frac{1}{2}t^2}\underbrace{\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(z-t)^2} \mathrm{d}z}_{=1} \\ &=e^{\frac{1}{2}t^2} \end{align} Now look at the mgf of the random variable $Y = a+bZ$. It is easy to show that: $$ m_Y(t)=E(e^{tY})=E(e^{t(a+bZ)})=E(e^{ta}e^{tbZ})=e^{ta}E(e^{tbZ})=e^{ta}m_Z(tb) $$ Now let $a=\mu$ and $b=\sigma$ then: $$ m_Y(t)=e^{\mu t}\cdot e^{\frac{1}{2}(\sigma t)^2}=e^{\mu t+\frac{1}{2}t^2 \sigma^2} $$ This is the mgf of a ${\cal N}( \mu, \sigma^2)$ distributed RV.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.