Conditional expectation of a bivariate normal distribution Can you help me?
Find the conditional expectation $\mathbb{E}[X|Y]$ if $(X,Y)$ possesses a bivariate normal distribution.
Is $\mathbb{E}[X|Y=y]=\mu_X+\sigma_X\rho(\frac{\displaystyle y-\mu_Y}{\displaystyle \sigma_Y})$ the solution?
My question: Is the same $\mathbb{E}[X|Y=y]$ and $\mathbb{E}[X|Y]$?
 A: $$ \mathbb{E}[X|Y]=h(Y) $$
where
$$h(y)=\mathbb{E}[X|Y=y]$$
So yes, it's somewhat the same, but not quite.
For future reference, here's derivation of this formula.
We'll suppose that $\sigma_X, \sigma_Y\neq 0$.We have that $$(X, Y) \sim N\left((\mu_X,\mu_Y), \begin{bmatrix}
     \sigma_X^2 & \rho\sigma_X\sigma_Y \\
     \rho\sigma_X\sigma_Y & \sigma_Y^2
\end{bmatrix}\right) $$
Then
\begin{align*}\mathbb{E}[X|Y=y] &= \int_{-\infty}^{\infty} x f(x |y)\text{d}x \\ &= \int_{-\infty}^{\infty} x \frac{f(x,y)}{f_Y(y)}\text{d}x \\ &= \frac{\int_{-\infty}^{\infty}x\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_Y\sigma_X}\right]\right)\text{d}x}{\int_{-\infty}^{\infty}\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_Y\sigma_X}\right]\right)\text{d}x}\\ &=
\frac{\int_{-\infty}^{\infty}x\exp\left(-\frac{1}{2(1-\rho^2)}\left[\frac{(x-\mu_X)^2}{\sigma_X^2}-\frac{2\rho(x-\mu_X)(y-\mu_Y)}{\sigma_X\sigma_Y}+\frac{\rho^2(y-\mu_Y)^2}{\sigma_Y^2}\right]\right)\text{d}x}{\int_{-\infty}^{\infty}\exp\left(-\frac{1}{2(1-\rho^2)}\left[\frac{(x-\mu_X)^2}{\sigma_X^2}-\frac{2\rho(x-\mu_X)(y-\mu_Y)}{\sigma_X\sigma_Y}+\frac{\rho^2(y-\mu_Y)^2}{\sigma_Y^2}\right]\right)\text{d}x}\\ &=
 \frac{\int_{-\infty}^{\infty}x\exp\left(-\frac{1}{2(1-\rho^2)}\left[\frac{x-\mu_X}{\sigma_X}-\rho\frac{y-\mu_Y}{\sigma_Y}\right]^2\right)\text{d}x}{\int_{-\infty}^{\infty}\exp\left(-\frac{1}{2(1-\rho^2)}\left[\frac{x-\mu_X}{\sigma_X}-\rho\frac{y-\mu_Y}{\sigma_Y}\right]^2\right)\text{d}x}\\ &=
 \frac{\int_{-\infty}^{\infty}\left(x+\mu_X+\sigma_X\rho\frac{y-\mu_Y}{\sigma_Y}\right)\exp\left(-\frac{1}{2(1-\rho^2)}\frac{x^2}{\sigma_X^2}\right)\text{d}x}{\int_{-\infty}^{\infty}\exp\left(-\frac{1}{2(1-\rho^2)}\frac{x^2}{\sigma_X^2}\right)\text{d}x} = 
\mu_X+\sigma_X\rho\frac{y-\mu_Y}{\sigma_Y} \end{align*}
Because
$$\int_{-\infty}^\infty x\exp\left(-\frac{1}{2(1-\rho^2)}\frac{x^2}{\sigma_X^2}\right)\text{d}x = 0 $$
and where $f(x,y)$ is the joint distribution of $X$ and $Y$ and $f_Y(y)$ is the marginal distribution of $Y$ (which we get by integrating $f(x,y)$ over $x$).
This gives the final result
$$\mathbb{E}[X|Y] = \mu_X+\rho\frac{\sigma_X}{\sigma_Y}(Y-\mu_Y) $$
A: *

*Sort ... of
$\mathbb{E}[X|Y=y]=\mu_X+\sigma_X\rho(\frac{\displaystyle y-\mu_Y}{\displaystyle \sigma_Y})$
but
$\mathbb{E}[X|Y]=\mu_X+\sigma_X\rho(\frac{\displaystyle \color{red}{Y}-\mu_Y}{\displaystyle \sigma_Y})$



*No.


$E[X|Y=y]$ is a number since $(Y=y)$ is an event. If $\mathbb P(Y=y) > 0$, it is defined as
$$E[X|Y=y] = \frac{1}{\mathbb P(Y=y)}\int_{Y=y} X d \mathbb P$$
O/w, if Y is a continuous random variable,
$$E[X|Y=y] = \int_{\mathbb R} x f_{X|Y}(x|y) dx$$
where
$$f_{X|Y}(x|y) = \frac{f_{X,Y}(x,y)}{f_Y(y)}$$
assuming $f_{X|Y}(x|y), f_{X,Y}(x,y)$ and $f_Y(y)$ exist.
For a continuous random variable that is not absolutely continuous (pdf doesn't exist), I have no idea.

$\mathbb{E}[X|Y]$ aka $\mathbb{E}[X|\sigma(Y)]$ is a random variable that depends on the value of $Y$ . It is defined as the random variable $Z$ s.t.


*

*$Z$ is $Y$-measurable or $\sigma(Z) := \sigma(\mathbb{E}[X|Y]) \subseteq \sigma(Y)$

*$\forall G \in \sigma(Y)$,
$$\int_G Z d \mathbb P := \int_G \mathbb{E}[X|Y] d \mathbb P = \int_G X d \mathbb P$$

Say $Y$ takes values in $\mathbb N$.
Then $\sigma(Y) = \sigma((Y=1),(Y=2),(Y=3), ...)$ and
$$\mathbb{E}[X|Y] = \mathbb{E}[X|Y=1]1_{Y=1} + \mathbb{E}[X|Y=2]1_{Y=2} + \cdots = \sum_{i=1}^{\infty} \mathbb{E}[X|Y=i]1_{Y=i}$$

2 implies that:
$\forall y \in \mathbb{N}$,
$$\int_{Y=y} Z d \mathbb P := \int_{Y=y} \mathbb{E}[X|Y] d \mathbb P = \int_{Y=y} X d \mathbb P$$
Hopefully, it is clear that in the above case and in general, if $Y=y$, then $E[X|Y=y] = \mathbb{E}[X|Y]$.
