# Simple probability problem.

$X$ ~ $U(0,1)$ and $Y$~U$(0,1)$ are two indenpendent variables. Get Pr ( Y > X).

NOW what i don't understant in this problem is how you set the limits of integration. I heard that you must set one fixed and let the other vary, but in details what's the meaning behind this? ps. U is the uniform distribution

• Y is also uniform distribution? or normal distribution? Dec 17, 2013 at 19:07
• is also uniform, thanks for noticing @MoonKnight! I've edited it! Dec 17, 2013 at 19:35

## 1 Answer

First method

Consider the domain $D = \{(x,y) \in [0,1]^2 : x < y\}$. By definition, $$\Pr\{Y > X\} = \iint_Ddxdy.$$ Using the Fubini theorem, we can split this double integral into $$\int_0^1 \left(\int_0^11_{\{x < y\}}dx \right)dy=\int_0^1\left(\int_0^y dx\right)dy = \int_0^1y\,dy = \frac{1}{2}.$$ In an intuitive manner, it is the same as following these steps:

• fix the value of $Y=y$,
• compute $\Pr\{y > X\}$,
• integrate the result with respect to $y$.

To be more precise, the corresponding formula is $$\Pr\{Y > X\} = \int_0^1\Pr\{y > X\}dy.$$

This is a very simple case of "desintegration of measure", also known as "conditional expectation" in Probability Theory.

Alternative method

Notice that $\Pr\{X=Y\}=0$ and $\Pr\{Y > X\} = \Pr\{X > Y\}$ by symmetry, so that $$1 = \Pr\{X=Y\} + \Pr\{Y > X\} + \Pr\{X > Y\} = 2\Pr\{Y > X\}$$ which entails $\Pr\{Y > X\} = \dfrac{1}{2}$.

• Thanks very much for such beautiful answer @Siméon! Dec 17, 2013 at 19:44