When are two random variables considered equal? A random variable is a function from a measurable space to the real numbers (where the corresponding sigma field is the borel sigma algebra). But while we study random variables, we usually 'forget' about the measurable space, as the random variable is 'completely determined' by the cummulative distribution function.
So, when we say that two random variables are equal, does it actually mean that they have the same cummulative distribution functions?
 A: No, when we compare two random variables, we should be comparing them on the same measurable space $\Omega$. Since we can easily have two random variables having the same distribution, but they can be either independent or correlated.
Say $X_1$ is a random variable with value $0$ or $1$ each with $1/2$ probability, and define another random variable $X_2:=1-X_1$. Then they have the same distribution, but we should not view them as the same.
A: If $X$ and $Y$ are random variables then the statement $X=Y$ is only meaningful if $X$ and $Y$ are defined on the same probability space $(\Omega,\mathcal A,P)$ and it is true iff $X(\omega)=Y(\omega)$ for every $\omega\in\Omega$. In this situation $X$ and $Y$ are equal random variables.

If that is the case then consequently $X$ and $Y$ automatically have equal distribution which means that:$$P_X(B)=P_Y(B)\text{ for every Borel set }B\tag1$$where $P_X$ and $P_Y$ are notations for the pushforward probability measures that $X$ and $Y$ generate.
A sufficient condition for $(1)$ is:$$F_X=F_Y$$where $F_X$ and $F_Y$ denote the CDF's of $X$ and $Y$.

But the converse of this is not true. This in the sense that $(1)$ can be satisfied while $X$ and $Y$ are not defined on the same probability space (or they are but this with $X\neq Y$).
