# Inequality of two independent random variables

My question is related to this one but more specific. Inequality on two random variables

We have two continuous random variables, $X$ and $Y$. We know that the expected value of both is 0 (or more generally, they have equal expected values). We know that they are independent. But we are not sure if they are identically distributed. Can we say that $P(X>Y)=P(X<Y)=0.5$?

In case, the above information is not adequate to claim $P(X>Y)=P(X<Y)=0.5$:

I performed a sampling experiment in R to test this. I sampled 1000 values of $X$ and $Y$ each from normal distribution, with means 0 but different values of standard deviation. The proportion of observations such that $X>Y$ was indeed $\sim$0.5. So, I am tempted to say that if independence and equality of means is not adequate to make the claim, symmetrical distributions should be adequate. Do we really need the two variables to be identically distributed? Is independence and equality of means sufficient for $P(X>Y)=P(X<Y)=0.5$?

• What you want to prove is not generally true. A simple counterexample is when both $X$ and $Y$ have Bernoulli distributions. Concerning your second question (at the end), a very simple modification of the demonstration at stats.stackexchange.com/questions/256444 will work for continuous joint distributions.
– whuber
Aug 7, 2018 at 11:46
• @whuber I did mean continuous random variables. I have edited the question.
– Mr K
Aug 7, 2018 at 12:48
• @whuber Please let me know if I am correct. On thinking more, I am wondering if even independence is required. As long as each of $X$ and $Y$ have equal means and symmetrical distributions, $P(X>Y)=P(X<Y)=0.5$ should be true. If we imagine the joint continuous distribution in 3D, the $X=Y$ plane divides the probability surface in two halves. By symmetry, both halves should have equal volumes under their portions of probability surface. Hence, the result.
– Mr K
Aug 7, 2018 at 14:45
• Yes, that's the fundamental idea.
– whuber
Aug 7, 2018 at 16:37

In simple words, for continuous random variables that are independent and symmetrically distributed around 0, $P(X=x, Y=y)=P(X=-x, Y=-y)$. Hence, $X>Y$ and $X<Y$ should be equally likely. Importantly, $X$ and $Y$ do not have to be identically distributed.

Assuming that the sampling distributions for $X$ and $Y$ are symmetrical about 0. $P(X>Y)$ can be expressed in terms of $P(\left| X \right| > \left| Y \right|)$ and $P(\left| X \right| < \left| Y \right|)$:

$P(X>Y) = P(\left| X \right| > \left| Y \right|)P(X>0 | \left| X \right| > \left| Y \right|) + P(\left| X \right| < \left| Y \right|)P(Y<0 | \left| X \right| < \left| Y \right|)$.

But $P(X>0 | \left| X \right| > \left| Y \right|) = P(X>0)=0.5$ and similarly, $P(Y<0 | \left| X \right| < \left| Y \right|) = P(Y<0)=0.5$. Hence, $P(X>Y) = 0.5\left[P(\left| X \right| > \left| Y \right|) + P(\left| X \right| < \left| Y \right|)\right]$.

Similarly, $P(X<Y) = P(\left| X \right| < \left| Y \right|)P(Y>0 | \left| X \right| < \left| Y \right|) + P(\left| X \right| > \left| Y \right|)P(X<0 | \left| X \right| > \left| Y \right|)$.

Again, $P(X<0 | \left| X \right| > \left| Y \right|) = P(X<0)=0.5$ and $P(Y>0 | \left| X \right| < \left| Y \right|) = P(Y>0)=0.5$. Hence, we get, $P(X<Y) = 0.5\left[P(\left| X \right| > \left| Y \right|) + P(\left| X \right| < \left| Y \right|)\right]$.

To summarize, $P(X>Y) = P(X<Y)$ and since $P(X=0)$ for continuous variables, they are both equal to 0.5.

• This argument is problematic. Your first equation requires much better justification, because it doesn't appear to follow from any standard relationship among random variables. The entire proof implicitly assumes $\Pr(X=0)=\Pr(Y=0)=0.$
– whuber
Aug 7, 2018 at 11:48