# Integral of a gaussian with random variance

Assuming: $$X(x,\mu)=\frac{1}{\sqrt{(2\pi)\sigma^2}} \exp[-\frac{1}{2}\frac{(x-\mu)^2}{\sigma^2}]$$ the integral of $X(x,\mu)$ from $-\infty$ to $+\infty$ is: $$S=\int_{-\infty}^{+\infty}dx X(x,\mu,\sigma)=1$$ if $\mu=0$. How is it possible to calculate the previous integral if $\sigma$ is normally distribuited random variable with $\mu_\sigma=0$?

-
As the random part doesn't depend on $x$ (the integration variable), there is no problem. We compute the integral pointwise (for each $\omega \in \Omega$) as above, $S(\omega) = \int_{-\infty}^\infty X\bigl(x, \mu,\sigma(\omega)\bigr)\; dx = 1$. –  martini Oct 1 '12 at 12:03
Your notion of the distribution of $\sigma$ needs some further thought. The standard deviation $\sigma$ is generally a positive number, and so a normal distribution for $\sigma$ is not a good choice (unless the mean $\mu_\sigma$ of this normal distribution is much larger than the standard deviation of this normal distribution). In particular, since a standard deviation of $0$ means that the random variable is constant with probability $1$, choosing $\mu_\sigma$ is a very bad choice. Also, that integral you show has value $1$ even when $\mu \neq 0$. –  Dilip Sarwate Oct 1 '12 at 14:33