# Realization of a conditional expectation wrt a random variable

Let $$Z$$ and $$X$$ be a real-valued random variables.

Is it true that $$\mathbb{E}[Z|X](\omega)=\mathbb{E}[Z|X=X(\omega)]$$ ? If so, why ?

P.S : I'm looking for a rigorous mathematical proof, not intuitive examples.

• what do you mean by this notation? do you mean $\mathbb{E}_{Z|X} (Z=w)$? Oct 2, 2016 at 14:01
• I don't know the notation you used with subscript $Z|X$
Oct 2, 2016 at 14:04
• $\mathbb{E}[Z|X]$ is the conditional expectation of $Z$ wrt $X$. So $\mathbb{E}[Z|X](\omega)$ is a realization of this random variable. On the other hand, $\mathbb{E}[Z|X=X(\omega)] \in \mathbb{R}$ is the expectation of $Z$ conditionally to the event $\{X=X(\omega)\}$, where $\omega$ is given.
Oct 2, 2016 at 14:07
• Can I have a reference of where you have seen this equality? Oct 2, 2016 at 14:16
• I actually wondered about this equality while trying to demonstrate that $\mathbb{P}(A)=\int_{\mathcal{X}}\mathbb{P}(A|X=x)d\mathbb{P}_X(x)$. I wanted to demonstrate the latter because it is used in the theory of statistical learning to prove that the Bayes predictor is the optimal in minimizing the risk. See for example these lecture notes page 16, in the proof of proposition 1, relation (2.1), with $A$ being $\{g(X)\ne Y\}$
Oct 2, 2016 at 14:41

By the Doob-Dynkin lemma, https://en.wikipedia.org/wiki/Doob%E2%80%93Dynkin_lemma $E[Z|X]$ is a function of $X$ so that helps with the intuition about being measurable with respect to the sigma algebra generated by X.
• Let us denote $Y(\omega)=y$ and suppose that $P(Y=y)>0$. I read that $\mathbb{E}[Z|Y=y]$ is well defined as the expectation of $Z$ under the probability measure $P(.|Y=y)$. So it seems like it is more than just a notation ...