# Sum of random variables are equal in distribution

Suppose that $$X,Y$$ are scalar random variables supported on some standard Lebesgue probability space $$(\Omega, \mathrm{P})$$, such that $$X \overset{\mathrm{d}}{=} Y$$ in the sense that their pushforward measures are equal, $$X_*(\mathrm{P}) = Y_*(\mathrm{P})$$. Does there exist a nondegenerate random variable $$Z$$ on $$(\Omega, \mathrm{P})$$ satisfying $$X + Z \overset{\mathrm{d}}{=} Y + Z$$?

In the case that $$Y = X\circ T$$ for some measure preserving automorphism $$T: \Omega \rightarrow \Omega$$ (this appears to be often the case by: Random variables with same distribution), and we have in addition the factorization $$T = S^2$$ for some automorphism $$S: \Omega \rightarrow \Omega$$, then clearly we can set $$Z = X \circ S$$, whence

$$X + Z = X + X\circ S \overset{\mathrm{d}}{=} X \circ S + X \circ S^2 = Z + Y$$.

Are there more general conditions than this, or perhaps conditions under which the answer to the question is negative?

Edit: it also turns out that if $$Y = X \circ T$$ where $$T$$ is measure preserving and non-ergodic then $$Z$$ exists; just take $$Z$$ such that $$Z \circ T = Z$$ almost surely and $$Z$$ non-constant. Then a computation like the one above shows equality in distribution.

There is$$^*$$ a counterexample in the atomic case, see below, so we will assume that $$(\Omega, \mathrm{P})$$ is a non-atomic standard Lebesgue probability space (so it is Isomorphic to the unit interval with Lebesgue measure, see https://en.wikipedia.org/wiki/Standard_probability_space). In that setting we claim:

If $$X \overset{\mathrm{d}}{=} Y$$ are two random variables on $$(\Omega, \mathrm{P})$$ , then there always exists a nondegenerate random variable $$Z$$ on $$(\Omega, \mathrm{P})$$ satisfying $$X + Z \overset{\mathrm{d}}{=} Y + Z$$.

Proof: We consider three cases.

Case 1 : $$X+Y$$ is not an almost sure constant. Then defining $$Z:=-X-Y$$ proves the claim.

Case 2: $$X+Y=c$$ almost surely but $$X$$ takes more than 2 values a.s. (That is, for every pair of reals $$a,b$$ we have $$\mathrm{P}[X \in\{a,b\}]<1.$$ ) Then $$Z:=X(c-X)$$ is nondegenerate. Denoting $$f(x)= x+x(c-x)$$, we have $$f(X)=X+Z$$ and $$f(Y)=Y+Z$$ almost surely, so $$X + Z \overset{\mathrm{d}}{=} Y + Z$$.

Case 3: $$X+Y=c$$ almost surely, and there exist $$a,b$$ such that $$\mathrm{P}[X \in\{a,b\}]=1.$$ In this case let $$D_a$$ be a subset of $$\{\omega: X(\omega)=a\}$$ with $$\mathrm{P}(D_a)=\mathrm{P}(\{\omega: X(\omega)=a\})/2$$. (To see that $$D_a$$ exists we may assume that $$(\Omega, \mathrm{P})$$ is the unit interval with Lebesgue measure, and observe that the mapping $$t \mapsto \mathrm{P}([0,t] \cap \{\omega: X(\omega)=a\})$$ is continuous on $$[0,1]$$ so its image includes $$\mathrm{P}(\{\omega: X(\omega)=a\})/2$$.) Similarly, let $$D_b$$ be a subset of $$\{\omega: X(\omega)=b\}$$ with $$\mathrm{P}(D_b)=\mathrm{P}(\{\omega: X(\omega)=b\})/2$$. Let $$Z(\omega)=1$$ if $$\omega \in D_a \cup D_b$$ and $$Z(\omega)=0$$ otherwise. Then $$Z$$ is independent of $$X,Y$$ so $$X + Z \overset{\mathrm{d}}{=} Y + Z$$.

QED

(*) Counterexample in the atomic case: If $$\Omega=\{0,1\}$$ with the uniform measure and maximal $$\sigma$$-algebra, and $$X(\omega)=\omega=1-Y(\omega)$$, then for every nonconstant random variable $$Z$$ on $$\Omega$$, the laws of $$X+Z$$ and $$Y+Z$$ are different; e.g., if $$Z(1)>Z(0)$$ then the maximum of $$X+Z$$ exceeds the maximum of $$Y+Z$$.