I have a challenge with an assignment.
"The random variables $X$ and $Y$ has the following joint probability density function $$f(x,y) = \begin{cases} 2 & 0<x<y<1 \\ 0 & \text{elsewhere} \end{cases} $$ Find the conditional distribution of $X$ given $Y$ and use it to calculate $P(X>5 \ | \ Y=0.7)$"
I was taught that $0<x<y<1$ is also equivalent to $0<x<1, x<y<1$
I have calculated the marginal density for $f_Y(y)$ as $2$ $$f_Y(y) = \int_0^1 f(x,y)\operatorname dx \\ = \int_0^1 2 \operatorname dx \\ = 2 $$
And then the conditional distribution of $X$ given $Y$ as $1$ $$f(x\mid y) = \frac{f(x,y)}{f_Y(y)} \\ = \frac{2}{2} \\ = 1 $$
And herein I'm stuck. How do I yet find $P(X>5 \ | \ Y=0.7)$ or is my approach wrong?
The problem you are experiencing has to do with the support of your random variable. Perhaps you will notice that you integrate over the condition $0<x<1$, but that leaves the other condition $x<y<1$ as the support for your marginal density for $Y$. This cannot be right, because there should be no $x$ left in sight.
The support of $f(x,y)$ in the following graph is the intersection of the green and blue regions:
To get the marginal density for $Y$, we want to integrate along $\operatorname dx$, so horizontally through the intersected region. This tells me the integral should be as follows:
$f_Y(y) = \int_0^y 2 \operatorname dx = \begin{cases} 2y: & 0<y<1 \\ 0: & \text{otherwise} \end{cases}$
Note that you can see this analytically (i.e. not by graphing it) simply by your condition $0<x<y<1$ restricts $x<y$, which means this should be your upper bound when integrating.
As you know, $f_{X|Y}(x|y) = \cfrac{f(x,y)}{f_Y(y)} = \begin{cases}\cfrac 1y: & 0<x<y<1 \\ 0: & \text{otherwise}\end{cases}$
$$\therefore f_{X|Y=.7}(x|.7) = \begin{cases}\cfrac 1{.7}: & 0<x<.7 \\ 0: & \text{otherwise}\end{cases} \quad \therefore \ P(X>5 \mid Y=0.7) = \int_5^\infty 0 \operatorname dx = 0$$
It's a little odd that this is the answer - maybe you mistyped and meant $P(X>.5 \mid Y=.7)?$ Either way, this is the process to do it.