# Do two almost surely equal random variables necessarily have the same probability?

Let $\Omega$ be a probability space with $\sigma$-algebra $\mathcal{A}$, and let $\mathcal{B}$ be the Borel $\sigma$-algebra.

Let $X:(\Omega,\mathcal{A}) \to (\mathbf{R},\mathcal{B})$ and $Y:(\Omega,\mathcal{A}) \to (\mathbf{R},\mathcal{B})$ be two measurable functions, and let $B\in \mathcal{B}$.

If $X$=$Y$ almost surely, then is $P(\omega\in \Omega : X(\omega)\in B)$=$P(\omega\in \Omega : Y(\omega)\in B)$? If so please provide a proof.

Background: I am doing some self-study on probability and measure theory and am having difficulty with the concept of two random variables being almost surely equal. I want to know if two random variables that are almost surely equal necessarily have the same probability. I suspect this is true but would like a formal proof.

• What is this notation? What does $P(A\in \mathcal{A} : X(A))$ mean? – Mankind Jul 15 '15 at 16:30
• I don't follow your notation either. Do you mean "if $X=Y$ a.s. and $A \in \mathcal{A}$, then is $P(X \in A)=P(Y \in A)$"? If so, the answer is yes: write $(X \in A)=(X \in A \wedge X=Y) \cup (X \in A \wedge X \neq Y)$ and then note that the latter set has probability zero. Then do the same for $Y$ to conclude. – Ian Jul 15 '15 at 16:38
• You meant $P(\omega\in\Omega\,:\,X(\omega)\in B)$, not $P(A\in\mathcal A\,:\,X(A)=B)$. Subsets of $\Omega$ have probabilities; you're assigning a probability to a subset of the power set of $\Omega$ (also there's no such thing as your $X(A)$). – David C. Ullrich Jul 15 '15 at 17:01
• I'm confused by the question. No, it isn't necessary that $X = Y$, but the event has probability one. What's there to show here? It's just the definition of almost sure. – dsaxton Jul 15 '15 at 17:01

Using the convention where $P(\omega\in \Omega:X(\omega)\in B)$ is written as $P(X\in B)$, you want to show $$X=Y\quad a.s.\implies P(X\in B)=P(Y\in B)$$ for all $B\in \mathcal B$. We start by "conditioning on" $\{X=Y\}$: $$P(X\in B)=P(\{X\in B\}\cap \{X=Y\})+P(\{X\in B\}\cap \{X\not=Y\})=P(\{X\in B\}\cap \{X=Y\})+0$$ since $P(\{X\neq Y\})=0$. Similarly, $$P(Y\in B)=P(\{Y\in B\}\cap \{X=Y\})$$ The final step is to realize that $$P(\{X\in B\}\cap \{X=Y\})=P(\{Y\in B\}\cap \{X=Y\})$$ because the sets on either side of the above equality are equal. Specifically, if $\omega\in \{X\in B\}\cap \{X=Y\}$, then this means that $X(\omega)\in B$ and $X(\omega)=Y(\omega)$, implying $Y(\omega)\in B$ so that $\omega\in \{Y\in B\}\cap \{X=Y\}$. This shows that $\{Y\in B\}\cap \{X=Y\}\subset \{Y\in B\}\cap \{X=Y\}$, and the reverse inclusion holds by an identical argument.
It is true, as \begin{align} P(X \in B) &= P(X\in B, X=Y) + P(X\in B, X\ne Y) \\ &\le P(Y\in B, X=Y) + P(X\ne Y) \\ &\le P(Y\in B) + P(X\ne Y) \\ &= P(Y\in B). \end{align} By symmetry, it also follows $P(Y\in B) \le P(X\in B)$ and thus $P(X\in B) = P(Y\in B)$.
• @PeterR $\{X\in B, X=Y\} = \{Y\in B, X=Y\}$ ... since $Y(\omega)=X(\omega)\in B$ for every $\omega\in\{X=Y\}$. – user251257 Jul 15 '15 at 17:10