How can I find the density of $E[X\mid Y]$ when $(X,Y)$ is gaussian I was tying to prove the following:
Given $(X,Y)$ a centered gaussian vector in $\mathbb{R}^2$ with the following covariance matrix
$$ \Sigma =  \begin{bmatrix} \sigma^2_x & \sigma_{x,y} \\ \sigma_{x,y} & \sigma^2_y \end{bmatrix} $$ such that $\det(\Sigma)>0$ so it admits a density. Find the expression of the density of  $E[X\mid Y]$.
I am supposed to find that the conditional law of $X|Y=y$ is $N(\frac{\sigma^2_y y}{\sigma_{x,y}},\frac{\det(\Sigma)}{\sigma^2_y} )$ but I can't get it. It must be something dumb, can you please check my math ?
PS: please excuse the "typo" $\mathbb{E}[X\mid Y=y]$

 A: The joint density is
$$
\text{constant}\cdot \exp\left( \frac{-1} 2 (\mathbf x-\mu)'\Sigma^{-1} (\mathbf x-\mu) \right) 
$$
where $\mathbf x=\begin{bmatrix} x \\ y \end{bmatrix}$ and $\mu =\begin{bmatrix} \mu_1 \\ \mu_2 \end{bmatrix}$ is the expected value.  We have
$$
\Sigma^{-1} = \frac 1 {\det\Sigma} \begin{bmatrix} \sigma_Y^2 & -\rho\sigma_{X,Y} \\  -\rho\sigma_{X,Y} & \sigma_X^2 \end{bmatrix}
$$
where $\sigma_{X,Y}=\rho\sigma_X\sigma_Y$ so $\rho$ is the correlation. (I used capital $X$ and capital $Y$ in the subscripts for a reason.) Multiplying matrices, we get this form of the joint density:
\begin{align}
\text{constant}\cdot \exp\left( -\frac{1}{2(1-\rho^2)} \left[ \frac{(x-\mu_X)^2}{\sigma_X^2} + \frac{(y-\mu_Y)^2}{\sigma_Y^2} - \frac{2\rho(x-\mu_X)(y-\mu_Y)}{\sigma_X \sigma_Y} \right] \right)
\end{align}
View the function in square brackest as a function of $x$ alone:
$$
\frac{(x-\mu_X)^2}{\sigma_X^2} - \frac{2\rho(x-\mu_X)(y-\mu_Y)}{\sigma_X \sigma_Y} + \text{constant}
$$
where "constant" means not depending on $x$.
Now complete the square, getting
$$
\frac{(x-\text{something})^2}{\text{something}}.
$$
Note well:


*

*The "something" in the numerator will depend on $y$ and will be the conditional expected value.

*From the "something" in the denominator you can figure out the conditional variance.  It will not depend on $y$.  It should come to $(1-\rho^2)\sigma_X^2$, i.e. it is the part of the variance of $X$ that is not "explained" by the fact that $Y$ varies.

