I am trying to reproduce the results from a paper in Mathematica. This task involves $K$ double integrals of the form
$$\int f(x,y)g(x)dx,$$
where $f(x,y)$ is a bivariate normal density with mean $(-4.08, -3.41)$ and diagonal covariance matrix with diagonal $(1/10,1/21)$, and $g(x)$ is a normal density with mean $\beta_0+\beta_1\xi$ and variance $\sigma_e^2$ (all of them known). I want to obtain this integral as a function of $\xi$.
Sigma = {{1/10, 0}, {0, 1/21}}
{β0, β1, σe} = \
{-2.3, 0.5, 0.0005}
f[ξ_] :=
NIntegrate[
PDF[MultinormalDistribution[{-4.08, -3.41}, Sigma], {η, ξ}]*
PDF[NormalDistribution[β0 + β1*ξ, σe], \
η], {η, -∞, ∞}]
Plot[f[t], {t, -10, 10}]
This code returns a $0$ for all values of $\xi$, while the true value should not be $0$.
How can I obtain this integral? What seems to be the problem? Is it the precision? Any ideas would be greatly appreciated.
My impression so far is that the $\sigma_e$ is very small and therefore the densities involved in the integration are very concentrated. This makes difficult the automatic integration.
ratex
andratey
. $\endgroup$