Show that two random variables are equal a.s. and say if they are equal surely as well

almost-everywhereequivalence-relationsmeasure-theory

Let $X,Y$ be two r.v.'s living on the probability space $(\Omega,\mathcal{F},R)$ such that $E[X1_{A}]=E[Y1_A], \forall A\in\mathcal{F}$. Show that $X=Y$ a.s..
What is more, is $X=Y$ surely? Why? Why not?

I have tried this way: consider $(X1_A – Y1_A)$, which is equal to $(X – Y)$ for $\omega \in A$ and equal to 0 otherwise. Take $E(X1_A – Y1_A)$:
$$E(X1_A – Y1_A) = (X – Y)\Pr(A) + 0\Pr(A^C) = (X – Y)\Pr(A)$$
Since we know that $E[X1_{A}]=E[Y1_A] \forall A\in\mathcal{F}$, we have, by linearity of expectation on l.h.s:
\begin{align}
0&=(X – Y)\Pr(A) \\
0&=X\Pr(A)-Y\Pr(A) \\
X\Pr(A)&=Y\Pr(A) \\
X&=Y
\end{align}

If the above is correct, I think that $X$ and $Y$ are equal both a.s. (that is, with probability 1, since I have considered the whole $\Omega = A \cup A^C$ and surely as well. Is this correct?

Best Answer

Your reasoning is not correct. You're saying that an expected value equals a random variable.

Juste take $A=\{X<Y\}$. Then $(Y-X)1_A$ is a nonnegative random variable with null expected value, so $(Y-X)1_A=0$ almost surely, which means $X\ge Y$ almost surely. With $A=\{X>Y\}$ you get $X\le Y$ almost surely, hence $X=Y$ almost surely.

Related Question