Thread: Gaussian distribution

1. Gaussian distribution

Hi!

I'm having a hard time solving this problem:

I hope somebody can give me a little help. I've been strugling with this for quite a while now.

/Iljtitj

2. You want to find,
$\displaystyle \int_{-\infty}^{\infty} \frac{1}{\sigma \sqrt{2\pi}}x^2\exp \left( - \frac{(x-\mu)^2}{2\sigma^2} \right) dx$
Let us use the hint,
$\displaystyle u=\frac{x-\mu}{\sqrt{2} \sigma}$
Also,
$\displaystyle u'=\frac{1}{\sigma \sqrt{2}}$
Thus,
$\displaystyle \frac{1}{\sqrt{\pi}}\int_{-\infty}^{\infty} x^2 \exp (-u^2) u' dx$
Since,
$\displaystyle x=\sqrt{2} \sigma u+\mu$
Thus, by substitution rule,
$\displaystyle \frac{1}{\sqrt{\pi}}\int_{-\infty}^{\infty} (\sqrt{2} \sigma u+\mu)^2 \exp (-u^2) du$
Thus, open,
$\displaystyle \frac{1}{\sqrt{\pi}} \int_{-\infty}^{\infty} (2\sigma^2u^2 +u\sqrt{2} \sigma \mu+\mu^2) \exp(-u^2)du$
Maybe, I will return to it later.
But that is the idea.

Also note that,
$\displaystyle \int_{-\infty}^{\infty} e^{-x^2}dx=\sqrt{\pi}$
This is why $\displaystyle \pi$ will cancel out in the end.
Hope that helps.

3. Thanks

Thanks alot, I'll give it another try with this.

4. Originally Posted by iljitj
Hi!

I'm having a hard time solving this problem:

I hope somebody can give me a little help. I've been strugling with this for quite a while now.

/Iljtitj
$\displaystyle I=\frac{1}{\sigma \sqrt{2 \pi}} \int_{-\infty}^{\infty} x^2 \exp \left( -\frac{(x-\mu)^2}{2\sigma ^2}\right) dx$

Now let $\displaystyle u=\frac{x-\mu}{\sqrt{2}\sigma}$, so $\displaystyle x=\sqrt{2}\sigma u+\mu$. Hence:

$\displaystyle I=\frac{1}{ \sqrt{ \pi}} \int_{-\infty}^{\infty} (\sqrt{2}\sigma u+\mu)^2 \exp (-u^2) du=$$\displaystyle \frac{1}{\sqrt{ \pi}} \int_{-\infty}^{\infty} [2\sigma^2 u^2+2 \sqrt{2}\sigma u \mu+\mu^2] \exp (-u^2) du$

as the middle term in the integral is odd it integrates up to $\displaystyle 0$ so:

$\displaystyle I=\frac{1}{\sqrt{ \pi}} \int_{-\infty}^{\infty} [2\sigma^2 u^2+\mu^2] \exp (-u^2) du$

The last term integrates up to $\displaystyle \mu^2$ as

$\displaystyle \frac{1}{ \sqrt{ \pi}} \int_{-\infty}^{\infty} \exp(-u^2) du=1$

and the first term integrates up to $\displaystyle \sigma^2$ as:

$\displaystyle \frac{1}{ \sqrt{2 \pi}} \int_{-\infty}^{\infty}x^2 \exp(-x^2/2) dx=1$

so:

$\displaystyle I=\sigma^2+\mu^2$

RonL

5. Cool, thanks..

Many thanks. I see now It's very much appreciated.

/Iljitj