Given that $0\le a\le b<1$ and $p$ is uniform on $[a,1]$ and $q$ is uniform on $[b,1]$ then if $p$ and $q$ are random selections then what is the probability that $q>p$?
Edit: I am trying to work on an opening strategy for poker as a function of the ante, bet, number of players, and position at the table by doing a simulation. The a and b values represent the minimum opening/calling requirements assuming that the hand each player gets is from a uniform distribution on [0,1] with 1 being the best hand.
Procedure: (We use $X$ instead of $p$, and $Y$ instead of $q$.)
So we want the probability that $Y\gt X$.
Note that the joint distribution of $X$ and $Y$ is uniform on a certain rectangle. The area of that rectangle is $(1-a)(1-b)$. The joint density function is the reciprocal of this area, on the rectangle, and $0$ elsewhere.
Draw the coordinate axes, and draw a picture of the rectangle. Now draw the line $y=x$. We want the probability that we are above the line.
Find the area of the region which is in the rectangle but above the line. This could be done by integration, but calculus is unnecessary: basic geometry is enough.
Then divide this area by $(1-a)(1-b)$.