Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the probability P(X>Y) given that X,Y are Uniformly distributed between [0,1]?

share|cite|improve this question

Draw the square $[0,1]\times[0,1]$ and the region $X>Y$ to see the answer.

share|cite|improve this answer
if that so then it will be conditional probability, which is not. if I would solve it the way you suggested above, I have to choose X Or Y before calculating. if I choose X first the probability would be X. if i choose Y first the probability would be 1-Y. – Tarek Abed Feb 27 '13 at 13:37
@TarekAbed One way is to integrate over all possible choices of $X$. What Emanuele did is, she showed you how to visually see it - the square is a set of all possible choices for $(X,Y)$ with each region being as likely an occurrence as its area (because of the uniform distribution for both $X$ and $Y$). So of all possible choices, you need the proportion where $X>Y$, as she indicated in the answer -- it is exactly 1/2... – gt6989b Feb 27 '13 at 13:52

A more general approach is based on symmetry -- since $X,Y$ have the same distribution and $\mathbb{P}[X=Y] = 0$ (here, because both are continuous random variables), any outcome $(x,y)$ where $x>y$ is just as likely as the outcome $(y,x)$, so $X>Y$ exactly half the time.

Note that this is independent of distribution - as long as $\mathbb{P}[X=Y] = 0$.

share|cite|improve this answer

Assuming $X$ and $Y$ are independent, Let $Z=X-Y$, Then were looking for $P(Z>0)$. To obtain the distribution of $Z$, you can convolve $X$ by $-Y$. The result will be a triange in the range $-1<x<1$. Then it it is obvious to see that $P(Z>0)=0.5$.

share|cite|improve this answer
That might work, I will try, thanks a lot. – Tarek Abed Feb 27 '13 at 13:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.