6
$\begingroup$

I am curious on how to find the probability a random variable X is greater than Y (given their means and variance, and also that they are independent.) I stumbled across this post: probability of one random variable being greater than another but am unsure how to answer this question with not necessarily normal distributions.

$\endgroup$

2 Answers 2

9
$\begingroup$

To get a general answer, knowing just the mean, variance, and that $X$ and $Y$ are independent will not suffice to know this probability. Consider the following example. If $X,Y$ are both $\mathcal{N}(0,1)$, so mean 0 and variance 1, then $P(X>Y) = \frac12$. On the other hand, suppose $X$ and $Y$ are both distributed to have equal probability of being $\pm 1$. Such an $X,Y$ pair will also have mean 0 and variance 1, but now, $P(X>Y) = P(X=1,Y=-1)= \frac14$ (otherwise, it is either the case that $X=Y$ or $-1 = X < Y = 1$).

The general formula for calculating $P(X>Y)$ when $X$ and $Y$ are independent will depend on the respective distributions $F_X$ and $F_Y$ of $X$ and $Y$. A number of equivalent formulae are $$\begin{aligned}\int P(Y < x)\,\mathrm dF_X(x) &= \int_{-\infty}^x\int_{-\infty}^\infty \mathrm dF_X(x)\mathrm dF_Y(y) \\&= \int_y^\infty \int_{-\infty}^\infty \mathrm dF_Y(y)\mathrm dF_X(x) = \int P(X>y)\,\mathrm dF_Y(y)\end{aligned}$$ Clearly, you will not get an analytic solution except in very special cases like when $Y$ and $X$ have nice formulas for their CDFs like in the normal case.

$\endgroup$
4
$\begingroup$

$$P(X > Y) = P(X-Y > 0) = 1-P(X-Y \leq 0)$$

So this problem is equivalent to finding the cumulative distribution function $F(Z \leq z)$ with $Z = X + (-Y)$, for the value $z=0$.

  • The general expression for the distribution function of a sum of two variables is a convolution $$P(X-Y \leq z) = \int_{-\infty}^{\infty} f_X(x) F_Y(z+x) dx$$

  • In special cases the integral has a closed form and often you can look up the solution.

    In particular a stable distribution family, which is closed under addition, will have a way to describe the distribution of a linear sum (but the normal distribution is the only case which has finite variance).

    The difference between two Poisson distributions is a Skellam distribution

    The difference between two Gamma distributions is often more difficult. Difference of Gamma random variables bit special cases like the pdf of the difference of two exponentially distributed random variables is simple.

    The difference between two t-distributions is a special case of the Behrens-Fisher distribution.

  • If you only know the variance and means then you can not find an exact distribution, but you could find bounds using limits for inequalities which come in several forms (which one to use depends on your situation and goal).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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