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,
$\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,
$u=\frac{x-\mu}{\sqrt{2} \sigma}$
Also,
$u'=\frac{1}{\sigma \sqrt{2}}$
Thus,
$\frac{1}{\sqrt{\pi}}\int_{-\infty}^{\infty} x^2 \exp (-u^2) u' dx$
Since,
$x=\sqrt{2} \sigma u+\mu$
Thus, by substitution rule,
$\frac{1}{\sqrt{\pi}}\int_{-\infty}^{\infty} (\sqrt{2} \sigma u+\mu)^2 \exp (-u^2) du$
Thus, open,
$\frac{1}{\sqrt{\pi}} \int_{-\infty}^{\infty} (2\sigma^2u^2 +u\sqrt{2} \sigma \mu+\mu^2) \exp(-u^2)du$
But that is the idea.

Also note that,
$\int_{-\infty}^{\infty} e^{-x^2}dx=\sqrt{\pi}$
This is why $\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
$
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 $u=\frac{x-\mu}{\sqrt{2}\sigma}$, so $x=\sqrt{2}\sigma u+\mu$. Hence:

$
I=\frac{1}{ \sqrt{ \pi}} \int_{-\infty}^{\infty} (\sqrt{2}\sigma u+\mu)^2 \exp (-u^2) du=$
$
\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 $0$ so:

$
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 $\mu^2$ as

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

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

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

so:

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

RonL

5. Cool, thanks..

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

/Iljitj