# Finding an expression for the probability that one random variable is less than another, given a condition.

Let $X$ and $Y$ be two independent random variables, who's supports are $[0,\infty]$. We can express $\mathbb{P}[X<Y]$ as:

$$\mathbb{P}[X < Y] = \int_{y=0}^{\infty}\int_{x=0}^{y}P_{X}(x)P_{Y}(y)dxdy.$$

Can we find a similar expression for:

$$\mathbb{P}[X < Y|Y<k],\; \mathrm{given}\;k\in[0,\infty)?$$

-
Without any further information about random variables $X$ and $Y$ this question can not be answered. – Sasha May 19 '13 at 14:47
@Sasha , can the solution not be given in terms of pdf's / cdf's and integrals? I'm assuming X and Y are independent and belong to the same support. – David Simmons May 19 '13 at 14:53
No, you need much more information about the distributions involved. What does $k$ have to do with anything? – dfeuer May 19 '13 at 15:07
k belongs to the support – David Simmons May 19 '13 at 15:08
What extra information do you need? $X$ and $Y$ are independent, the support of $X$ and $Y$ are the same, $k$ is a constant that also belongs to the support. – David Simmons May 19 '13 at 15:13

You can find an expression for the desired conditional probability. Assume for simplicity that $X$ and $Y$ have respectively density functions $f_X(x)$ and $f_Y(y)$. Then $$\Pr(X\lt Y|Y\lt k)=\frac{\Pr((X\lt Y)\cap (Y\lt k)}{\Pr(Y\lt k))}.$$ Both numerator and denominator can be expressed as integrals. For the numerator, we want $\int_{y=0}^k\int_{x=0}^y f_X(x)f_Y(y)\,dx\,dy$. For the denominator, it is much the same, except that $x$ goes from $0$ to $\infty$.
Remarks: $1.$ The independence does not play a large role here, apart from (in concrete cases) making the integrations easier. For joint density functions $f_{X,Y}(x,y)$ the expression for the conditional probability is $$\frac{\int_{-\infty}^k\int_{-\infty}^y f_{X,Y}\,dx\,dy}{\int_{-\infty}^k\int_{-\infty}^\infty f_{X,Y}\,dx\,dy}.$$
$2.$ Note that as pointed out by @Jon Claus, the denominator is just the probability that $Y\lt k$, so it can be expressed in the simple form $\int_0^k f_Y(y)\,dy$.
For the denominator, you need not include an integral for $X$. After all, you can factor the double integral using Fubini's theorem and use the fact that the integral across the reals of $f_X(x)$ is one. – Jon Claus May 19 '13 at 17:05
@JonClaus: True. I wanted a generic setup, where $f_X(x)f_Y(y)$ can be replaced by $f_{X,Y}(x,y)$. But thanks, I will add a remark about the "general" case. – André Nicolas May 19 '13 at 17:09