Gauss-Hermite Quadrature adjustment in weights

65 Views Asked by At

I am currently trying to work out an integral of the following form:

$$ I(x') = \int_{-\infty}^{\infty} \phi(x; \mu, \sigma)\phi(x; x', \sigma(x))dx, $$

where $\phi(x; a, b)$ is the density of a Gaussian with mean $a$ and standard deviation $b$.

This integral is effectively the marginal density function for $x'$ obtained from the following hierarchical model: $$ x \sim \mathcal{N}(\mu, \sigma^2), $$ $$ x' \mid x \sim \mathcal{N}(x, \sigma^2(x)). $$ Essentially, a true measurement $x$ (unobserved) comes from $\mathcal{N}(\mu, \sigma^2)$, and then it is contaminated with Gaussian noise $\sigma(x)$ which is a known function of $x$ (left out here) to produce the observed noisy measurement $x'$. Naturally, obtaining the marginal distribution of $x'$ is unnecessary in most hierarchical Bayesian inference. However, due to the nature of my model, this marginal density has to be computed.

Naturally, I opt for Gauss-Hermite quadrature to find this integral. But the usual change of variable by letting $x = \sqrt{2}\sigma y + \mu$ does not work since such a change of variable leads to the majority of the mass in $\phi(x; x', \sigma(x))$ not being captured. It suffices to know that $\phi(x; x', \sigma(x))$ can be approximated by $\phi(x; x', \sigma(x'))$ to some extend.

Hence, I instead opt for a change of varible with $x = \sqrt{2}\sigma(x')y + x'$ to ensure the integration nodes capture most of the mass of $\phi(x; x', \sigma(x))$. More preceisely, let $h(x; x') =\phi(x; x', \sigma(x))$, the integral after the change of variable I applied becomes $$ I(x') = \frac{\sigma(x')}{\sqrt{\pi}\sigma}\int_{-\infty}^\infty\exp\left(-\frac{(\sqrt{2}\sigma(x')y + x' - \mu)^2}{2\sigma^2}\right)h(\sqrt{2}\sigma(x')y + x'; x')dy. $$

However, after such a change of variable, I cannot figure out the proper weight adjustment that needs to be applied in order to get the correct result. Any help would be appreciated!! Thank you very much!