Conditional Expectations and Almost Every Equivalence of Random Variables I was just wondering whether or not the following statement is true or not. I haven't been able to come up with counter examples, nor have I been able to prove it yet...
Let $X,Y:\Omega\longrightarrow \mathbb{R}$ be two random variables on a probability space $(\Omega,\mathscr{F},\mathbb{P})$ such that $X = Y$ $\mathbb{P}$-almost everywhere. Let $\mathscr{G}\subseteq \mathscr{F}$ be a sub sigma algebra. Then $\mathbb{E}\left[ X\middle\vert \mathscr{G}\right] = \mathbb{E}\left[ Y\middle\vert \mathscr{G}\right]$ $\mathbb{P}$-almost everywhere.
If it is true, could you please show me how I could prove it? Many thanks in advanced
 A: Use Fubini on integrals of form $\mathbb E (X-Y)Z$ for arbitrary $\mathcal G$-measurable $Z$.
A: This property is the uniqueness property of the conditional expectation. There are several ways to prove this. Here is the version I was taught when I was first formally introduced to the conditional expectation:
Let $C_X = \mathbb E[X\mid \mathscr G]$ and $C_Y = \mathbb E[Y\mid \mathscr G]$. Consider $D = \{C_X>C_Y\}$.
By definition of the conditional expectation
$$
\int_G \mathbb E[X\mid \mathscr G] \, \mathrm d\mathbb P = \int_G X\, \mathrm d\mathbb P
$$
for any $G\in \mathscr G$. Then
$$
\int_D (C_X-C_Y)\,\mathrm d\mathbb P = \int_D C_X \, \mathrm d\mathbb P - \int_D C_Y\, \mathrm d\mathbb P = \int_D X\,\mathrm d \mathbb P - \int_DY\mathrm \,d\mathbb P =0.
$$
The last equality comes from the assumption that $X = Y$ a.s. i.e. $\int_D X\, \mathrm d\mathbb P = \int_D Y\, \mathrm d\mathbb P$. This means that $P(C_X>C_Y) = P(D) = 0$. Similarly for $\widetilde D = \{C_X < C_Y\}$ so $P(C_X = C_Y) = 1$.
A: For any $A\in\mathcal G$, we have $\mathbb E[X\mathbf1_A]=\mathbb E[Y\mathbf1_A]=\mathbb E[\mathbb E[Y|\mathcal G]\mathbf1_A]$. Thus by uniqueness of conditional expectation, $\mathbb E[X|\mathcal G]=\mathbb E[Y|\mathcal G]$ almost surely.
