Saturday, 2 September 2017

probability - Calculate $int_{-infty}^infty x^2e^{-x^2} dx$ using Gaussian random variables and the properties of pdfs




I've been asked the following question in an exam of probability and statistics undergraduate course. Help is appreciated.



Calculate the numeric value of $\int_{-\infty}^\infty x^2e^{-x^2} dx$ using Gaussian random variables and the properties of pdfs (probability density functions).



Note: The normal cdf table was given



Here is how I tried to solve it:





  • Take the normal pdf and use the fact that pdfs are equal to 1 when integrated from $-\infty$ to $\infty$.



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




  • Let $\mu = 0$ and $\sigma^2 = \frac{1}{2}$. And the integral simplifies to this.



$\int_{-\infty}^\infty e^{-x^2} dx = \sqrt{\pi}$





  • Then I've tried to integrate the main integral by parts.



$\int x^2e^{-x^2} dx = x^2 \int e^{-x^2} dx - \int2x(\int e^{-x^2} dx) dx $




  • Plug in $\sqrt{\pi}$ where needed and simplify.




$= x^2 \sqrt{\pi} - \int 2x( \frac{\sqrt{\pi}}{2} erf(x) ) dx $




  • Further simplifying I get the following and this is where I stuck.



$= x^2 \sqrt{\pi} - \sqrt{\pi} \int x \, erf(x) dx $





  • The functions don't converge, so I can't proceed. Also, I don't know how to integrate the error function.



If you know how to proceed, or if you think this should've been solved in another way, please answer. Note that I need a solution involving Gaussian random variables and the properties of pdfs (as required.)


Answer



The step where you "plug in $\sqrt{\pi}$ as needed" is incorrect. On the preceding line you have indefinite integrals, where you haven't kept track of the bounds of integration. Turning it into definite integrals would also affect the factor $x^2$, for example.



Also, it's much better to do the integration by parts like this, and not involve the error function:
$$
\int_a^b (x e^{-x^2}) \cdot x \, dx = \Bigl[(-\tfrac12 e^{-x^2} ) \cdot x \Bigr]_a^b - \int_a^b (-\tfrac12 e^{-x^2} ) \cdot 1 \, dx

,
$$

and then see what happens as $a \to -\infty$ and $b \to \infty$.



(I know this isn't a probabilistic solution, but it's just to comment on your attempt.)


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...