Dependent Continuous Random Variables I am currently studying mathematics in college and I am having trouble with one of the assignments.
The question is: 
Let $Y$ be a number picked at random in $[0, 1]$. Given $Y=y$, suppose that $X$ is a random variable, such that $X\mid(Y=y)$ is a number picked at random in $[0,y]$. What is $\Pr(X\leqslant 1/2)$
I am thinking of the following - is $f(y)= y [ 0\leqslant y\leqslant 1]$ and $f(x) = x [ 0\leqslant x\leqslant y]$?
I am trying to find a way to integrate over the possible values for x and y so that I can find the resulting probability?
Any help would be appreciated.
Thank you.

Hint:
$$
P\left(X\leq \tfrac12\right)=\int_0^1 P\left(X\leq \tfrac12\mid Y=y\right)f_Y(y)\,\mathrm dy.
$$
