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.
 A: 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.
