I'm trying to prove:
$\text { Suppose } X=Y \text { almost everywhere (i.e., if } \mathbf{P}\{\omega: X(\omega)=Y(\omega)\}=1 \text{ ). Prove that if } \\ \mathbb{E}(X) \text{ exists, then } \mathbb{E}(Y) \text{ exists, and }\mathbb{E}(X)=\mathbb{E}(Y).$
My proof for $\mathbb{E}(X)=\mathbb{E}(Y)$ is:
Define $Z = X - Y$, then $Z = 0$, then $\mathbb{E}(Z) = \mathbb{E}(X) - \mathbb{E}(Y) = \int_\Omega Z dP = \int_\Omega 0 dP = 0$, so $\mathbb{E}(X)=\mathbb{E}(Y)$
But I have the following questions:
- Is my proof valid?
- I'm not familiar with measure theory, so I'm wondering what role "almost everywhere" plays in this question. In my proof, I didn't use it, so I'm just confused with the meaning of it.
- How to prove $\mathbb{E}(Y)$ exists?
Could someone give me some hints? Thanks.
Hint: You need "almost everywhere" or in the probabilistic context "almost surely" ($a.s.$) to negate the potential of having a positive probability somewhere other than where $X=Y$.
So for your proof, you would want to add this:
$$Z = X-Y \implies Z=0 \quad a.s.$$
Let $B = \\{\omega \in \Omega: Y(\omega) \neq X(\omega)\\}$ then by assumption $P(B) = 0$ therefore:
$$E[X] = \int_{\Omega} X(\omega)P(d\omega) = \int_{\Omega \setminus B} X(\omega)P(d\omega) + \int_B X(\omega)P(d\omega) = \int_{\Omega \setminus B} Y(\omega)P(d\omega)=E[Y]$$
Therefore, if $|E[X]|\leq \infty$ then $E[X] = E[Y]$ by the above, since they must equal each other over a set of probability $1$. For all we know $Y(a) = \infty \quad \forall a \in B$ but who cares, it happens with zero probability.