Let $X$ be a uniformly chosen number in the interval $(0, 1)$. Choose a point P uniformly from the triangle with vertices at $(X,0), (0,X)$, and $(0,0)$. Let $Y$ be the $y$ coordinate of the point P . Compute $E(Y )$.
Here is my work:
Here is what I know:
$E(Y) = \int_{-\infty}^{\infty}E(Y|X=x)\ * \ f_x(x)\ dx$
and
$E(Y|X=x) = \int_{-\infty}^{\infty}y * f_{Y|X}(y|x)\ dy$
So since, the blue line can be expressed as $y = X - x$, then the boundaries are $0<y<X-x$ and $0<x<1$
Then I said:
\begin{equation} E(Y)=\int_{0}^{1}\int_{0}^{X-x}y*f_{Y|X}(y|x)*f_{X}(x)\ dy\ dx \end{equation}
However, I'm stuck since, I don't know how to find $f_{Y|X}(y|x)$
Am I doing this right? If so, how do I find $f_{Y|X}(y|x)$ so I can complete the problem?
