Probability Theory – Distribution Equality and Almost Sure Equality

almost-everywheremeasure-theoryprobability distributionsprobability theoryrandom variables

Show that if two random variables X and Y are equal almost surely, then they
have the same distribution. Show that the reverse direction is not correct.

If $2$ r.v are equal a.s. can we write $\mathbb P((X\in B)\triangle (Y\in B))=0$ (How to write this better ?)

then

$\mathbb P(X\in B)-\mathbb P(Y\in B)=\mathbb P(X\in B \setminus Y\in B)\le \mathbb P((X\in B)\triangle (Y\in B))=0$

$\Longrightarrow P(X\in B)=\mathbb P(Y\in B)$

but the other direction makes no sense for me, i don't know how this can be true.

Best Answer

Take $X$ and $Y$ with probabilities $P(X=1)=P(X=2)=P(Y=1)=P(Y=2)=0.5$ and which are independent. Then $$P(X=Y) = P(X=1, Y=1) + P(X=2,Y=2) =\\= P(X=1)P(Y=1)+P(Y=2)P(Y=2)=0.5,$$ meaning that $X=Y$ holds with probability $0.5$, not $1$.