Finding $E[X\mid Y]$ and $E[Y\mid X]$

72 Views Asked by At

Finding $E[X\mid Y]$ and $E[Y\mid X]$

I need to find $E[X\mid Y]$ and $E[Y\mid X]$ and I'm having trouble with those indicator functions. I hope I solved it correctly

Given the densities for $X$: $2x\,dx$ in $[0,1]$ and $Y$ is uniform in $[0,X]$

There is no mention of any sort of independence

$f_X(x)=2x\mathbb1_{[0,1]}(x)$

then I need the density of Y knowing X

$f_{Y\mid X}(y\mid x)=\frac1x \mathbb 1_{[0,x]}(y)$

joint density is: $f_{X,Y}(x,y)=f_{Y\mid X}(y\mid x)f_X(x)=2x\mathbb1_{[0,1]}(x)\cdot \frac1x \mathbb 1_{[0,x]}(y)$

then the marginal of $Y$ is

$f_Y(y)=\int f_{Y\mid X}(y\mid x)f_X(x)\,dx=\int_y^1\frac1x\cdot 2x\mathbb1_{[0,1]}(x)\,dx=2-2y$

so it follows,

$E[X\mid Y]=\int_0^1 x\cdot\frac{f_{X,Y}(x,y)}{f_Y(y)}\,dx=\int_0^1 x\cdot\frac{2\cdot\mathbb1_{[y,1]}(x)}{2-2y}\,dx=\int_y^1\frac{2x}{2-2y}\,dx=\frac{1-y^2}{2-2y}=\frac{1+y}{2}$

$E[Y|X]=\int_0^1 y\cdot\frac{f_{X,Y}(x,y)}{f_X(x)}\,dy=\int_0^1 y\cdot\frac{2\cdot\mathbb1_{[0,x]}(y)}{2x}\,dy=\int_0^x\frac{2y}{2x}\,dy=\frac{1-y^2}{2-2y}=\frac{x^2}{2x}=\frac{x}{2}$