The last step is based on the fact that the integral won't change if we simply rename the integration parameters $x$ and $y$ consistently. So we have shown that $\mathbb{P} (Y > X) = \mathbb{P} (X > Y)$

Side note: Even if $X$ and $Y$ are dependent, this result still holds so long as their joint PDF is exchangeable i.e. $p(x, y) = p(y, x)$

If we assume that $\mathbb{P} (Y = X) = 0$ then we can conclude that $\mathbb{P} (Y > X) = 1/2$. But is this assumption justified?

Question 2

Prove or disprove: If $X$ and $Y$ are independent and $\mathbb{P} (Y > X) = \mathbb{P} (X > Y)$, then they have identical marginal distributions. If this statement is true, then is it still true if $X$ and $Y$ are dependent?

However the marginal distributions of $X \sim \mathcal{N} \left(\mu, \sigma_1^2\right)$ and $Y \sim \mathcal{N} \left(\mu, \sigma_2^2\right)$ may be different. This result holds regardless of whether $X$ and $Y$ are independent.

$\begingroup$One interesting technical point is that if the probability of $X=c$ is $0$ for every value of $c,$ that's not enough to entail that probabilities are given by integrating a density function. The standard counterexample is the Cantor distribution. But more to the point$\,\ldots\qquad$$\endgroup$
– Michael HardyJan 6 at 20:23

$\begingroup$$\ldots\,$is that I probably wouldn't solve this problem by considering such integrals anyway.$\endgroup$
– Michael HardyJan 6 at 20:23

1

$\begingroup$What if X and Y are Bernoulli? Isn’t that a counterexample to P(X=Y)=0?$\endgroup$
– The LaconicJan 7 at 3:03

2 Answers
2

This answer is written under the assumption that $\mathbb{P}(Y=X)=0$
which was part of the original wording of the question.

Question 1: A sufficient condition for$$\mathbb{P}(X<Y)=\mathbb{P}(Y<X)\tag{1}$$is that $X$ and $Y$ are exchangeable, that is, that $(X,Y)$ and $(Y,X)$ have the same joint distribution. And obviously
$$\mathbb{P}(X<Y)=\mathbb{P}(Y<X)=1/2$$since they sum up to one. (In the alternative case that $\mathbb{P}(Y=X)>0$ this is obviously no longer true.)

Question 2: Take a bivariate normal vector $(X,Y)$ with mean $(\mu,\mu)$. Then $X-Y$ and $Y-X$ are identically distributed, no matter what the correlation between $X$ and $Y$, and no matter what the variances of $X$ and $Y$ are, and therefore (1) holds. The conjecture is thus false.

I will show that the distribution of the pair $(X,Y)$ is the same as the distribution of the pair $(Y,X).$

That two random variables $X,Y$ are independent means that for every pair of measurable sets $A,B$ the events $[X\in A], [Y\in B]$ are independent. In particular for any two numbers $x,y$ the events $[X\le x], [Y\le y]$ are independent, so $F_{X,Y}(x,y) = F_X(x)\cdot F_Y(y).$

And the distribution of the pair $(X,Y)$ is completely determined by the joint c.d.f.

Since it is given that $F_X=F_Y,$ we can write $F_{X,Y}(x,y) = F_X(x)\cdot F_X(y).$

This is symmetric as a function of $x$ and $y,$ i.e. it remains the same if $x$ and $y$ are interchanged.

But interchanging $x$ and $y$ in $F_{X,Y}(x,y)$ is the same as interchanging $X$ and $Y,$ since
$$
F_{X,Y}(x,y) = \Pr(X\le x\ \&\ Y\le y).
$$

Therefore (the main point):

The distribution of the pair $(X,Y)$ is the same as the distribution of the pair $(Y,X).$

$\begingroup$@farmer : Start with $\Pr(X\le x\ \&\ Y\le y)$ and interchange $x$ and $y,$ and you get $\Pr(X\le y\ \&\ Y\le x).$ But if you start with the same thing and interchange $X$ and $Y,$ then you get $\Pr(Y\le x\ \&\ X\le y).$ The claim, then, is that $\Pr(X\le y\ \&\ Y\le x)$ is the same as $\Pr(Y\le x\ \&\ X\le y). \qquad$$\endgroup$
– Michael HardyJan 8 at 5:28