Integral of the square of a non-standard gaussian pdf

54 Views Asked by At

What is the integral of the square of a non-standard univariate gaussian distribution? The following is what I have so far, is it right?

$\int_{-\infty}^{\infty} p^2(x)dx$, where $p(x)\sim N(\mu, \sigma^2)$

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

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

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

$= \frac{\sigma \sqrt{\pi}}{2\pi \sigma^2} $

$= \frac{1}{2\sigma \sqrt{\pi}} $

And what is the integral if it is a 2D gaussian?

$\int_{-\infty}^{\infty} p^2(x, y)dx$, where $p(x, y)\sim N(\mu, \Sigma^2)$

$\int_{-\infty}^{\infty} p^2(x, y)dx = \int_{-\infty}^{\infty} (\frac{1}{2\pi \sqrt{\Sigma}} e^{\frac{-(X-\mu)^2}{2\Sigma}})^2 dx$

$= \int_{-\infty}^{\infty} \frac{1}{4\pi^2 \Sigma} e^{\frac{-2(X-\mu)^2}{2\Sigma}} dx$

$= \frac{1}{4\pi^2 \Sigma} \int_{-\infty}^{\infty} e^{\frac{-(X-\mu)^2}{\Sigma}} dx$

$= \frac{\sqrt{\pi\Sigma}}{4\pi^2 \Sigma} $

$= \frac{1}{4\pi\sqrt{\pi} \sqrt{\Sigma}} $