What do we (really) mean when we say that two random variables are equivalent? If we define random variables as a measurable function from measurable set $(S,\mathbb{S})$ to measurable set $(T, \mathbb{T})$, where $\mathbb{S}, \mathbb{T}$ are $\sigma$-algebra on S and T. Some texts claim that two random variables X and Y are equivalent if P(X=Y) = 1. However any particular element $\{t\}, \forall t \in T$ may not be measurable, as there is no guarantee that $\{t\} \in \mathbb{T}$, then what do we mean by P(X=Y)? because apparently $\sum_{t \in T} P(X=t, Y=t)$ is not always well defined
I guess an example could be: $S = T = \mathbb{Z}$, $\mathbb{S} = \mathbb{T} = \sigma\{\{\mbox{even numbers}\}, \{\mbox{odd numbers}\}\}$, $X = 2 * s$, $Y = s + 4$. It is my understanding that both $X, Y$ are measurable functions because their inverse image of any measurable set in $(T, \mathbb{T})$ is a measurable set in $(S, \mathbb{S})$. That makes them valid random variables. But $\{X=Y\}$ is not measurable
 A: There's a major misconception here. First, what do we really mean by $P(X=Y)=1$? Well, we mean exactly what it says: We mean that $P(E)=1$, where $E$ is the event $$E=\{s\in S\,:\,X(s)=Y(s)\}.$$
I imagine you can concoct an example where that set $E$ is not measurable. (EDIT: For example, let $S=T=\{0,1\}$, and give both $S$ and $T$ the trivial sigma-algebra. Then any function from $S$ to $T$ is measurable. If $X=1$ and $Y=\Bbb 1_{\{0\}}$ then the set where $X=Y$ is not measurable. Thanks to Did.) But it's measurable in the situations that actually arise in practice (as far as I know - if there's a counterexample that actually comes up I'd love to hear about it).
The major misconception is that this has something to do with $\sum_{t\in T}P(X=t,Y=t)$. That is not the same as $P(X=Y)$ even in very nice situations. For example, take $S=[0,1]$, with the Borel sigma-algebra and Lebesgue measure, and say $T$ is also $[0,1]$ with the Borel sigma-algebra. Let $X(s)=Y(s)=s$ for all $s\in S$. Then the event $X=Y$ is certainly measurable, and $P(X=Y)=1$. But $\sum_{t\in T}P(X=t,Y=t)=0$.
Measures are countably additive, not arbitrarily additive.
