# Can we find a distribution of the conditional expectation?

Suppose we have two random variables $(X,Y)$ according to a joint pdf $f_{X,Y}(x,y)$.

We can, of course, talk about the conditional expectation of $E[X\mid Y]$. Note that the conditional expectation is a random variable too.

My question is: Given $f_{X,Y}(x,y)$ can we find the distribution of $E[X\mid Y]$ in general ? Was this ever attempted?

Clearly, for specific examples, we can do this. For example, if $(X,Y)$ are jointly Gaussian then $E[X\mid Y]= \frac{E[XY]}{E[Y^2]} Y$ which is a Gaussian random variable.

My initial guess is that this is very difficult to do. This is because if we let $f(Y)=E[X\mid Y]$ then \begin{align} \mathbb{P}[ E[X\mid Y]\le y]= \mathbb{P}[ f(Y)\le y]= \mathbb{P}[ Y \le f^{-1}(y)], \end{align} but I doubt that we can find the inverse of $E[X\mid Y=y]$.

Anyway, I am looking forward to your thoughts.

If you have a joint density $f_{X,Y}(x,y)$ for $(X,Y)$ then you can obtain $E(X|Y)=:h(Y)$ via the expression $$h(y) := \int x\,f_{X|Y}(x\mid y)\,dy = \int x\,\frac{f_{X,Y}(x,y)}{f_Y(y)}\,dy\tag1$$ If the integrals involved in (1) [ including the integral that defines the marginal density $f_Y(y)$ ] are tractable you get an explicit form for $h$. One case where this is possible is if $f_{X,Y}$, when viewed as a function of $x$ alone, is seen to be (a constant times) the density of some random variable; then $h(y)$ is precisely the mean of that random variable. For example in the bivariate Gaussian case the joint density $f_{X,Y}(x,y)$, when viewed as a function of $x$, is, after some algebra, proportional to the density of a univariate Gaussian having mean $\mu_X +\rho\frac{\sigma_X}{\sigma_Y}(y-\mu_Y)$. This is one way to derive the conditional expectation: $$E(X\mid Y=y) = \mu_X +\rho\frac{\sigma_X}{\sigma_Y}(y-\mu_Y).$$ Having obtained $h$, it's a separate matter to determine the distribution of $h(Y)$. If you're lucky, $h$ is invertible, or $h(Y)$ is a transformation that yields a familiar distribution.