I am working on a problem and am a bit confused.
The problem:
Consider R.V. X and Y distributed on the triangle {(x,y) $\in$ $\mathbb R^2$| 0$\le$X$\le$1, 0$\le$Y$\le$x}
p(x,y) = 2, 0$\le$X$\le$1, 0$\le$Y$\le$x
0, else
Find E(X$^2$|Y=y)
What I have done so far:
E(X$^2$|Y=y) = $\int$x$^2$ px,y(x|y) dx
p(x,y)(x|y) = $p(x,y)\over py(y)$
py(y) = $\int_{0}^1$(2) dx = 2x (from 0 to 1) = 2
for y = y (plug in y for values of py(y) where y is =
p(x,y)(x|y) = $2\over2$
E(X$^2$|Y=y) = $\int$x$^2$ $2\over2$ dx
Is this the correct approach? I think I might have used the incorrect bounds, because when I found py(y) there was no y left in the equation to plug in the arbitrary y value.
We have $$ p_Y(y)=\int_0^1 p_{X,Y}(t,y)dt = \int_y^1 2dt=2(1-y)$$ for $0\le y\le 1$.
Then $$ X|Y=y \sim p_{X|Y}(\cdot|y)= \frac{p_{X,Y}(\cdot,y)}{p_Y(y)}= \frac{1}{1-y}$$ for $0\le y<1$.
Thus $$\mathbb{E}[h(X)|Y=y]=\int_0^1h(x)p_{X|Y}(x|y)dx=\int_0^1 h(x)\frac{1}{1-y}dx$$ for $0\le y <1$.