Joint cdf and conditional expectation problem Suppose $X, Y$ are continuous RVs with joint pdf $f(x, y) = 0.5$ for $0\leq x\leq y\leq 2$ and $f(x, y) = 0$ otherwise.
(i) Find the cdf of $Y$.
(ii) Compute $P(X < 0.5 | Y = 1.5)$. Are $X$ and $Y$ independent?
(ii) Use the law of iterated expectations to find $E[X]$.
My attempt:
(i) I suppose we just integrate the marginal pdf of $Y$? The marginal pdf is
$$f_Y(y) = \int_{0}^{y} 0.5 \,dx = 0.5y$$
, for $0\leq y \leq 2$.
Then, the marginal cdf would be
$$F_Y(y) = \int_{0}^{y} 0.5r \,dr = 0.25y^2$$
, for $0\leq y \leq 2$ and $0$ otherwise(?)
(ii) By conditional probability, we have
$$P(X<0.5|Y=1.5) = \frac{P(X<0.5 \cap Y=1.5)}{P(Y=1.5)}$$
$$P(Y = 1.5) = f_Y(1.5) = 0.25(1.5)^2 = 0.5625$$
$$P(X<0.5 \cap Y=1.5) = f(x, 1.5) = 0.5$$
Thus $P(X<0.5|Y=1.5) = 0.5/0.5625 \approx 0.888$.
For independence, note that $f_X(x) = \int_{x}^{2} 0.5 \,dy = 1 - \frac{x}{2}$, for $0\leq x \leq 2$. By inspection as $f(x, y) \neq f_X(x)f_Y(y) \forall x, y$, we may conclude that $X$ and $Y$ are not independent.
(iii) The law of iterated expectations suggests that $E[E[X|Y]] = E[X]$. So
$$E[X] = E[E[X|Y]] = \int_{0}^{2} E[X|Y]f_Y(y) \,dx$$
However $E[X|Y=y] = \int_{-\infty}^{\infty} x f_{X|Y}(x|y) \,dx = \int_{-\infty}^{\infty} x \frac{f(x, y)}{f_Y(y)} \,dx = \int_{0}^{2} x\cdot \frac{0.5}{0.5y} \,dx = \int_{0}^{2} \frac{1}{y} \,dx = \frac{2}{y}$.
So $E[X] = E[E[X|Y]] = \int_{0}^{2} \frac{2}{y} \cdot 0.5y \,dx = \int_{0}^{2} 1 \,dx = 2$
This is my first time doing such a problem. Is what I have done correct? Any assistance here is much appreciated!
 A: i) The marginal CDF is $1$ above the pdf' support.
$$\begin{align}F_Y(y)&=\begin{cases}0&:&\qquad y<0\\0.25 y^2&:& 0\leq y\lt 2\\1&:&2\leq y\end{cases}\end{align}$$

ii)  As you have in part three, the conditional probability density is defined as:
$$\begin{align}f_{X\mid Y}(x\mid y) &= \dfrac{f_{X,Y}(x,y)}{f_Y(y)}\\[1ex]&=\dfrac{0.5}{0.5 y}~\mathbf 1_{0\leq x\leq y\leq 2}\\[1ex]& =~ \dfrac 1y~\mathbf 1_{0\leq x\leq y\leq 2}\end{align}$$
So, use that:
$$\begin{align}\mathsf P(X\leq 0.5\mid Y=1.5)&=\int_{-\infty}^{0.5}f_{X\mid Y}(x\mid 1.5)~\mathrm d x\\[1ex]&=\int_0^{0.5}\dfrac 1{1.5}\,\mathrm d x\\&~~\vdots\end{align}$$

iii) Indeed $$\begin{align}\mathsf E(X)&=\mathsf E(\mathsf E(X\mid Y))\\&=\int_\Bbb R\mathsf E(X\mid Y=y)~f_Y(y)~\mathrm d y\\&=\int_\Bbb R\left(\int_\Bbb R x~f_{X\mid Y}(x\mid y)~\mathrm d x\right)~f_Y(y)~\mathrm d y\\[1ex]&=\int_0^2\left(\int_0^y \dfrac xy\,\mathrm d x\right)~0.5y\,\mathrm dy\end{align}$$
Just pay attention to which is the variable of integration....
