# Probability IID Random Variables having the inequality $X_1 \leq X_2$

Given two IID Random Variables $X_1 , X_2$ what is the probability $\Pr[X_1 \leq X_2]$?

I have thought of two approaches of solving this. Don't know which one is correct, (or are both equivalent)

1. $\Pr[X_1 \leq X_2] = \Pr[X_1 \leq x, X_2 \geq x]$ for all $x \implies \int_{\mathbb{R}}f_X(x)(1-f_X(x))dx$

2. $\Pr[X_1 \leq X_2] = \int\int_D f_X(x)f_X(y)dxdy$, where $D =$ {${(x,y)\in \mathbb{R}^2 : x \leq y}$}

As I write this I realise that the first one is dimensionally incorrect, but maybe there's a way to correct that.

• The answer is not always 1/2. Consider $X$ spots on a red die and $Y$ spots on a green die. But what if $P(X = y) = 0$? – BruceET Aug 14 '16 at 7:52
• In general, $P(X_1<X_2)+P(X_2<X_1)+P(X_1=X_2)=1$. When $(X_1,X_2)$ is i.i.d., by symmetry, $P(X_1\leqslant X_2)=P(X_2\leqslant X_1)$, hence, if $P(X_1=X_2)=0$ (which happens exactly when the common distribution $\mu$ of $X_1$ and $X_2$ has no atom), then $P(X_1\leqslant X_2)=\frac12$. (This is probably what you were asked to say.) If $\mu$ has some atoms, then $P(X_1\leqslant X_2)=\frac12+\frac12\sum\limits_x\mu(\{x\})^2$. – Did Aug 14 '16 at 8:32
• @Did, great one!! – Satish Ramanathan Aug 14 '16 at 10:57