Probability of a uniform distrubated stochastic variable larger than another So let's say I have two independent random variables $X \sim U(0,1)$ and $Y \sim U(0,1)$. I want to find the probability $P(Y>2X)$
For a uniformly distributed random variable $P(X<a) = F(x) = \frac{x-a}{b-a}$
However, I'm not sure how to calculate the probability when $a$ is a random variable.
 A: For independent $X$ and $Y$ we have
$$
P((X,Y)\in A)=\int_\mathbb{R} P((x,Y)\in A)\, P_X(\mathrm dx)=\int_\mathbb{R} P((X,y)\in A)\, P_Y(\mathrm dy)
$$
for any (measurable) $A\subseteq \mathbb{R}$. Use this with $A=\{(x,y)\in\mathbb{R}^2\mid y>2x\}$.
The above immediately yields
$$
\begin{align}
P(X<\tfrac12 Y)&=\int_\mathbb{R} P(X<\tfrac12y) f_Y(y)\,\mathrm dy\\
&=\int_0^1 F_X(\tfrac12 y)\,\mathrm dy=\frac14
\end{align}
$$
since $F_X(x)=x$ for $x\in [0,1]$.
A: Consider the RV $Z=Y-2X$ (which takes values from $[-2,1]$). The probability that $Z<0$ is the probability that $2X> 1$ (probability $1/2$) plus the probability that $2X\le 1$ (i.e., $X\le 1/2$ - with probability $1/2$) and $Y\le 2X$, which is the probability that one random uniform $[0,1]$ distributed RV is smaller or equal than another. The latter event has probability $1/2$ since $P(X>Y)+P(X<Y)=1$ and then use symmetry.
So, $P(Z<0)=\frac{1}{2}+\frac{1}{2}\frac{1}{2}=\frac{3}{4}$, so
$$P(Y-2X\ge 0)=P(Z\ge 0)=1-\frac{3}{4}=\frac{1}{4}.$$
A: Draw a pair of axes, and the $1\times 1$ square on which the joint density function "lives."
Draw the line $y=2x$. 
We want the probability that the pair $(X,Y)$ ends up (in the square and) above the line. 
This is the area of a certain right triangle, divided by the area of the square, which conveniently happens to be $1$. 
Remark: If the joint density function happened to be zero outside the square, but not constant in the square, the procedure is roughly similar. But instead of finding the area of the triangle, you would integrate the joint density function over the triangle. 
