I'm working on a challenging machine learning problem, where I need to find the expectation of the likelihood of one Gaussian, given the parameters of another. Apologies if any of the notation is rough, this is new territory for me.
More precisely, given two independent Gaussian distributions.
$$X \sim \mathcal{N}(\mu_1, \sigma_1^2) $$
$$Z \sim \mathcal{N}(\mu_2, \sigma_2^2)$$
where the values of $\mu_1$, $\sigma_1$, $\mu_2$ and $\sigma_2$ are known. Suppose I were to randomly draw values from $Z$ and evaluate the likelihood using the pdf of $X,$ $p(X)$ with $\mu_1, \sigma_1$, what is the expected likelihood? To clarify, not the expected value of $Z$ but the expectation of the likelihood function itself.
I've managed to get the expected likelihood $E[p(X)]$, which holds for $Z$ when $\mu_1=\mu_2$ and $\sigma_1=\sigma_2$, via the following:
Definition of the pdf of $X$ is:
$$ p(X) = \int_{-\infty}^\infty \frac{1}{\sqrt{2\pi}\sigma_1} e^{-\frac{(x-\mu_1)^2}{2\sigma_1^2}} \, dx$$
and the definition of the expectation is:
$$E[x] = \int_{-\infty}^\infty x \cdot f(x) \ dx$$ $x = p(X)$ so $$E[p(X)] = \int_{-\infty}^\infty p(X) \cdot p(X) \ dx$$
$$E[p(X)] = \int_{-\infty}^\infty \left(\frac{1}{\sqrt{2\pi}\sigma_1} e^{-\frac{(X-\mu_1)^2}{2\sigma_1^2}}\right) \cdot \left(\frac{1}{\sqrt{2\pi}\sigma_1} e^{-\frac{(X-\mu_1)^2}{2\sigma_1^2}}\right) \ dx$$
rearranging a little gives:
$$E[p(X)] = \frac{1}{\sigma_1^2 \cdot 2 \pi} \cdot \int_{-\infty}^\infty \exp\left(-\frac{(x - \mu_1)^2}{\sigma_1^2}\right) \ dx $$
and finally the following result, which I've verified empirically via simulation:
$$ E[p(X)] = \frac{1}{\sigma_1^2 \cdot 2 \pi} \cdot {\sigma_1 \sqrt{\pi}} $$
But, how do I calculate the likelihood when integrating over $Z$, with $\mu_1$ and $\sigma_1$ from $X$?
I tried defining $x = \frac{(z - \mu_2)\sigma_1}{\sigma_2}$ and using the change of variables approach, substituting and integrating over $dz.$ However, that doesn't work, I'm definitely doing something wrong.
How should I proceed from here? I'm lost and any help would be much appreciated.
Thanks