I'm currently going through a book on measure-theoretic probability. In it, we defined conditional expectation:
Let X belong to $M^+(Omega, F)$ and P be a probability measure on F. For each sub-sigma-field G of F, the conditional expectation$ P(X|G)$ is the random variable $X_G$ in $M^+(X,G)$ for which $P(gX) = P(gX_G)$.
However, there is a small disclaimer: be careful to check that $X_G$ is G-measurable. I'm confused about how this can be a problem, since isn't $X_G\in M^+(X,G)$? Doesn't this by definition make it $G-$measurable?