4

Derive from first principles, the moment generating function of a Gaussian Distribution with $$PDF= \dfrac{1}{\sqrt{2\pi \sigma^2}}e^{-(x- \mu)^2/2\sigma^2}$$

MY ATTEMPT

MGF= E[$e^{tx}$]= $$\int_{-\infty}^{\infty} e^{tx} \dfrac{1}{\sqrt{2\pi \sigma^2}}e^{-(x- \mu)^2/2\sigma^2}dx$$
Now to perform a substitution;
z= $\dfrac{(x- \mu)}{\sigma}$
$x=z\sigma + \mu$
$dx=\sigma \ \ du$
$$\int_{-\infty}^{\infty} e^{tz\sigma}e^{t\mu} \dfrac{1}{\sqrt{2\pi }}e^{-z^2/2}dz$$ which can be rewritten as ;
$$e^{t\mu}\int_{-\infty}^{\infty} e^{tz\sigma} \dfrac{1}{\sqrt{2\pi }}e^{-z^2/2}dz \ \ \ \ \ \ (*)$$

I have also noted that for the standard gaussian distribution the moment generating function is as follows;
MGF=E[$e^{tx}$]=$$\int_{-\infty}^{\infty} e^{tx} \dfrac{1}{\sqrt{2\pi }}e^{-x^2/2}dx=e^{t^2/2}$$
Now what Im having trouble with is combining these two facts.....
I know the
CORRECT ANSWER I SHOULD GET; $$MGF \ \ = \ \ e^{\mu t}e^{\sigma^2 t^2 /2}$$

Now I can rewrite (*) as ;
$$e^{t\mu}e^{ \sigma}\int_{-\infty}^{\infty} e^{tz} \dfrac{1}{\sqrt{2\pi }}e^{-z^2/2}dz$$ and this equals (by comparison to standard gaussian); $$e^{t\mu}e^{ \sigma}e^{t^2/2}$$ but it seems ive lost a $\sigma $ somewhere?!

otupygak
  • 1,299
  • 2
    Hint: questions like this are solved by completing the square in the exponent: $$az^2+2bz = \left(\sqrt{a}z + \frac{b}{\sqrt{a}}\right)^2 - \frac{b^2}{a}$$ – Dilip Sarwate Jun 05 '14 at 18:06
  • Surely this must exist as an existing question on stackexchange? – wolfies Jun 05 '14 at 18:12
  • By the way, your error is to rewrite $e^{t z\sigma }$ as $e^\sigma\times e^{tz}$, which is incorrect. –  Aug 05 '15 at 13:58

1 Answers1

10

$$\int_{-\infty}^{\infty} e^{tx} \dfrac{1}{\sqrt{2\pi \sigma^2}}e^{-(x- \mu)^2/2\sigma^2}dx$$

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

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

and the integral should be obvious while the term outside can be tidied up

Henry
  • 157,058