This is a question from an intro to probability text book. I see that one can represent the interval of $x$ in terms of $y$ like such $[0,(2-y)/2]$. But, for the conditional expectation of $X$ conditioned on $Y=y$, is said to be $ E[X\mid Y=y] = \frac{2-y}{4}\quad \text{for}\;\; 0
Problem: Let $X$ and $Y$ be two random variables that are uniformly distributed over the triangle formed by the points $(0,0),\, (1,0)$ and $(0,2)$. Calculate $E[X]$ and $E[Y]$.