# Equivalence in distribution and almost sure equivalence

Consider two random variables $$X$$ and $$Y$$ equivalent in distribution, i.e. $$P(X\in A)=P(Y\in A)$$ for any set $$A$$. I know that does not imply the almost sure equivalence $$P(X=Y)=1$$. For example, $$X \sim U(0,1)$$ and $$Y=1-X \sim U(0,1)$$ are equivalent in distribution but they are almost surely unequal.

What if we have $$E\left(\frac{X}{Y}\right)=1$$? Are they almost surely equivalent? Thanks a lot.

• Your same example of $X$ and $Y$ seems to satisfy $\mathbb E[X/Y]=1$... Commented Oct 16, 2019 at 0:38
• The integral $\int_{0}^{1}\frac{x}{1-x}dx$ does not converge. Commented Oct 16, 2019 at 2:54
• @KangpingYan You're right, I've made a blunder. Deleted the incorrect answer, I'll see if I can find a fix. Commented Oct 18, 2019 at 17:30

Another counterexample:

We will design a density for a random variable $$U$$ such that $$\mathbb{E}[U] \mathbb{E}[1/U] = 1.$$ Then taking $$X$$ and $$Y$$ to be i.i.d. copies of $$U$$ does the trick - as long as $$U$$ is continuous, they are a.s. unequal, but $$\mathbb{E}[X/Y] = \mathbb{E}[X] \mathbb{E}[1/Y] = \mathbb{E}[U] \mathbb{E}[1/U] = 1.$$

Let us define $$U$$. For some $$l > 0,$$ to be chosen, consider the following density $$f_U(u) := \frac{2}{1 + l^2} \cdot \begin{cases} |x| & x \in [-1,l] \\ \,\,0 & \textrm{otherwise}\end{cases}.$$

$$f$$ is indeed a density, since the area under $$|x|$$ over $$[-1, l]$$ is $$(1 + l^2)/2$$.

Next, \begin{align} \mathbb{E}[U] &= \frac{2 (l^3 - 1)}{3(l^2 + 1)} \\ \mathbb{E}[1/U] &= \frac{2(l - 1)}{l^2 + 1}\end{align}

So, the counterexample exists if there exists $$l > 0$$ such that $$4(l^3 - 1)(l-1) - 3(l^2 + 1)^2 = 0.$$

But such an $$l$$ exists by the intermediate value theorem since the above function is $$1$$ at $$0,$$ and $$-12$$ at $$1$$ (there's also a solution somewhere between $$5$$ and $$6$$).

An interesting point with this strategy is that $$U$$ must take both signs - otherwise, if for e.g. $$U > 0$$, then the strict convexity of $$z \mapsto 1/z$$ forces $$\mathbb{E}[U] \mathbb{E}[1/U] > 1$$ unless $$U$$ is a constant a.s. This also suggests a mechanism to make the conclusion you wanted hold - suppose $$(X,Y)$$ are exchangable - so $$\mathbb{E}[X/Y] = \mathbb{E}[Y/X] = 1$$ - and that $$X/Y > 0$$ a.s. Then, by the above reasoning, it follows that $$X/Y$$ is a constant a.s. (and that constant is $$1$$). Similarly if $$X/Y < 0$$ a.s. Note that in the above counterexample, $$(X,Y)$$ is exchangable, but $$X/Y$$ takes both signs.

• The uniform density $\mathrm{Unif}\left(\epsilon, 1-\epsilon\right)$ is $\frac{1}{1-2\epsilon}$ so the expectation $\mathbb{E}[X/Y] = -1+\frac{1}{1-2\epsilon}\log\frac{1-\epsilon}{\epsilon}$, which is decreasing on $(0,1/2)$ and goes to $1$ as $\epsilon\rightarrow1/2$. Commented Oct 18, 2019 at 13:26
• @KangpingYan new counterexample, hopefully no silly errors this time. Commented Oct 19, 2019 at 5:34