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

How can I find this probability $P(X<Y)$ ? knowing that X and Y are independent random variables.

share|cite|improve this question
In general, just knowing they are independent isn't useful, since $X$ might be a random number from $-1$ to $0$ and $Y$ might be a random number from $1$ to $2$, or visa versa, giving you probabilities anywhere between $1$ and $0$. If they are identical and independent continuous random variables, then the probability will be $1/2$. (Continuity implies $P(X=Y)=0$ and identical implies $P(X<Y)=P(X>Y)$.) – Thomas Andrews Dec 17 '12 at 23:43
What if both of them are exponentially distributed random variables? – user Feb 18 '14 at 19:34
up vote 6 down vote accepted

Assuming both variables are real-valued and $Y$ is absolutely continuous with density $f_Y$ and $X$ has cumulative distribution function $F_X$ then it is possible to do the following

$$ \Pr \left[ X < Y \right] = \int \Pr \left[ X < y \right] f_Y \left( y \right) \mathrm{d} y = \int F_X \left( y \right) f_Y \left( y \right) \mathrm{d} y $$

Otherwise, as @ThomasAndrews said in a comment, it is case-by-case.

share|cite|improve this answer

I think we can control everything by the following general solution.

Consider $Z:=X-Y$. Then, by putting condition on the value of X, we get

$$\begin{align} P(X<Y) & = P(Z<0)\\ & =\int_{-\infty}^{\infty}P(Z<0|X=x)dF_{X}(x)\\ & =\int_{-\infty}^{\infty}P(X-Y<0|X=x)dF_{X}(x)\\ & =\int_{-\infty}^{\infty}P(x-Y<0|X=x)dF_{X}(x)\\ & =\int_{-\infty}^{\infty}P(x<Y)dF_{X}(x)\\ & =\int_{-\infty}^{\infty}(1-P(Y\leq{x}))dF_{X}(x)\\ & =\int_{-\infty}^{\infty}(1-F_{Y}(x))dF_{X}(x) \end{align}$$

You may also put a condition on the value of $Y$ to get a similar result. So, the solution of this problem depends on what you want.

share|cite|improve this answer

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.