Given $X,Y\sim i.i.U[0,1]$, what is $P(XLet a, b be real numbers randomly selected independently and uniformly from the range of (0,1).
What is P(a < b)?
The problem here is that a can be equal to b, so is 
P(a < b)  ≈   0.5 or 
P(a < b)  →   0.5 formally correct? Or anything else?
What I'm looking for here is a correct formal way to write this probability down.
 A: If $a$ and $b$ are independent and identically distributed as $U[0,1]$, then $P(a \lt b) = 0.5$. It is also true that $P(a \le b) = 0.5$, because $P(a = b) = 0.$
In fact, if $a$ and $b$ are independent and identically distributed from any continuous distribution on the real numbers, then $P(a \lt b) = 0.5$, $P(a \le b) = 0.5$, and $P(a = b) = 0.$
A: For independent continuous $U(0,1)$ random variables we have (taking into account that their density is constant and equal to $1$)
$$P(a<b) =P(a\leq b)= \int_0^1 \int_0^b da\,db = \int_0^1(b-0)\, db $$
$$=\int_0^1b\, db = \frac 12 b^2 \big|^1_0 = \frac 12\cdot1^2 - \frac 12\cdot 0^2 = \frac 12$$
A: If we start with an infinitely-large ordered set and we pick two elements from the set, we know that one (and only one) of the following situations can be correct:


*

*a < b

*a = b

*a > b


We can state:


*

*P( a = b ) = 0 (assuming selection from an infinite set of values)

*P( a < b ) = P ( a > b ) (because a and b are independently selected)


Therefore P( a < b ) = 0.5.  
Your example refer to independent selection from the set of all real numbers in the range (0, 1), so this result applies.
