I know the definition of the conditional expectation regarding two random variables. Now I encountered the folllowing
Definition: Let $\mathcal{G} \subseteq \mathcal{F}$ be a sub-$\sigma$-algebra of $\mathcal{F}$. We say Z is the conditional expectation of $X$ given $\mathcal{G}$, denoted as $E[X|\mathcal{G}]$ if :
- $E[|Z|] < \infty$
- $Z$ is $\mathcal{G}$ measurable
- for all $G \in \mathcal{G}$: $E[Z 1_G]=E[X 1_G]$.
I can't comprehend that definition.
I know the (very simple) Definition of conditional expectation of $X$ given $Y=y$, i.e. $E[X|Y=y]$.
And I also know that we can view the conditional expectation $E[X|Y]$ as a function in $y$.
But how can one understand the conditional expectation of $E[X|\mathcal{G}]$?
I assume that $E[X|\mathcal{G}]$ is a generalization of $E[X|Y]$, but how does it generalize it?
For example $E[X|Y]$ is the generalization of $E[X|Y=y]$, since $E[X|Y=y]$ is a constant that we get for a specific $y \in \mathbb{R}$. But if we take $\omega \in \Omega$ such that $Y(\omega)=y$, then for this $\omega$ we have $E[X|Y](\omega)=E[X|Y=y]$. Thus I interpret E[X|Y] as taking all values of $E[X|Y=y]$ and writing it as a function.
But I do not see how the "$\sigma$"-algebra version $E[X|\mathcal{G}]$ does extend the existing $E[X|Y]$ conditional expectation. And I am also confused by the notation $E[X|\mathcal{G}]$. Up so far, the conditional expectation was not "conditioned" on a $\sigma$-algebra, (it was conditioned on a value $Y=y$ and on a r.v. $Y$). Also in the above Definition, we use a $\sigma$-algbra but still have a random variable $Z$. Why is that so?
I would be happy if someone could explain this to me.