# Find the conditional expectation.

Let (X,Y) be a random vector with a pdf $$cx(y-x)e^{-y},$$ $$0\leq x\leq y \leq \infty$$. Find c, $$\mathbb{E}(X|Y)$$ and $$\mathbb{E}(Y|X)$$. c = 1, it was easy to calculate ($$\int_\mathbb{R}\int_\mathbb{R}cx(y-x)e^{-y}dxdy = 1$$). But what can i do with conditional expectations? I kinda have some problems with understanding its definition. Could you please give me any hints?

The PDF of the random variable $$X|Y$$ is$$f_{X|Y}(x,y)=\frac{P(X=x,Y=y)}{P(Y=y)}=\frac{f_{XY}(x,y)}{f_Y(y)}$$Find the marginal distribution of $$Y$$ by integrating the joint distribution with respect to $$x$$. Correspondingly for $$Y|X$$. The expectation $$\mathbb E[X|Y]$$ is defined by$$\int_{-\infty}^\infty xf_{X|Y}(x,y)dx$$Correspondingly for $$\mathbb E[Y|X]$$.
• Thanks for the answer, but i still dont get this. I can't figure out how to get $f_{Y}(y)$ (density of Y) from given density of (X,Y) and what should i think about.. – saharockk Dec 13 '19 at 19:46
• The marginal distribution of $Y$ i.e. the PDF of $Y$ is $\int_{-\infty}^\infty f_{XY}(x,y)dx$. Similarly to get the PDF of $X$, integrate the joint PDF $f_{XY}(x,y)$ with respect to $y$. @saharockk – Shubham Johri Dec 13 '19 at 19:48
We have $$f_{X, Y}(x, y) = x (y - x) e^{-y} [0 < x < y]$$, so the marginal pdf $$f_X(x)$$ is $$x \hspace {1.5px} [0 < x] \int_{\mathbb R} (y - x) e^{-y} [x < y] dy = x \hspace {1.5px} [0 < x] \int_{\mathbb R^+} \tau e^{-\tau - x} d\tau.$$ $$f_Y(y)$$ can be found in the same way. Then we can find $$\mathbb E(X \mid Y = y)$$, and from that we can construct the random variable $$\mathbb E(X \mid Y)$$.
Instead, let $$(X, Y) = (U, U + V)$$. Since the Jacobian of the transformation is $$1$$, we have $$f_{U, V}(u, v) = u v e^{-u - v} [0 < u \land 0 < v]$$, which means that $$U$$ and $$V$$ are independent and identically distributed. Therefore $$\mathbb E(Y \mid X) = \mathbb E(U + V \mid U) = U + \mathbb E V = X + \int_{\mathbb R^+} v^2 e^{-v} dv, \\ \mathbb E(X \mid Y) = \mathbb E(U \mid U + V) = \frac 1 2 \mathbb E(U + V \mid U + V) = \frac Y 2.$$