So a stats problem involving normal random variables has a solution involving a step where the following simplification occurs (based on inspection):
$$\int_{-\infty}^{ \infty } y\frac{e^{-(y-x)^2/2}}{\sqrt{2\pi}} dy = x$$
But I don't understand how they arrived at that.
I know that:
$$\Phi(x)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{x}e^{-\frac{t^2}{2}}dt$$
and:
$$\int_{-\infty}^{\infty}e^{-x^2}dx = \sqrt{\pi}$$
Applying the substitution $u=(y-x)$ yields;
$$\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}(u+x)e^{-\frac{u^2}{2}}du$$
$$\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}ue^{-\frac{u^2}{2}}du+\frac{x}{\sqrt{2\pi}}\int_{-\infty}^{\infty}e^{-\frac{u^2}{2}}du$$
By symmetry, the first integral is equal to $0$. Which leaves us with...
$$\frac{x}{\sqrt{2\pi}}\int_{-\infty}^{\infty}e^{-\frac{u^2}{2}}du=\frac{x}{\sqrt{2\pi}}\cdot\sqrt{2\pi}=x$$
$$\therefore\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}ye^{-\frac{(y-x)^2}{2}}dy=x$$
as expected.