I am unsure of the validity of this assertion. I would appreciate it if someone could corroborate it. Suppose we have an arbitrary function $f$ of a random variable $y$ and the expectation of such a function conditioned on another random variable $x$ is $c$: $\mathbb{E}[f(Y) \mid X=x]=c$. Using $\mathbb{1}_{x}(X)$ as the characteristic function, is the following statement correct?
$ \begin{align} &\mathbb{E}[f(Y) \mid X=x] &&= c \\ &\mathbb{E}[f(Y) \mathbb{1}_{x}(X)] &&= c\mathbb{E}[\mathbb{1}_{x}(X)] \\ &\mathbb{E}[(f(Y)-c) \mathbb{1}_{x}(X)] &&= 0 \\ \end{align} $
- Why do the second and third inequalities follow, if at all?
- If the statement follows, does that imply we can express known conditional expectations as joint expectations?
Let $X$ and $Z$ two arbitrary r.v., then we define $\mathbb{E}[Z|X=x]$ as the Radon-Nikodym derivative of the measure defined by $\mu(B):=\mathbb{E}[Z\mathbf{1}_{\{X\in B\}}]$ respect to the measure $P_X$, that is, by definition we have that
$$ \mathbb{E}[Z\mathbf{1}_{\{X\in B\}}]=\int_{B}\mathbb{E}[Z|X=t]P_X(dt)\tag1 $$
Then if $\mathbb{E}[f(Y)|X=x_0]=c$ for some $x_0\in \mathbb{R}$ from (1) we have that
$$ \mathbb{E}[f(Y)\mathbf{1}_{\{X=x_0\}}]=c\Pr [X=x_0]=c\mathbb{E}[\mathbf{1}_{\{X=x_0\}}]\\ \therefore\quad 0=\mathbb{E}[f(Y)\mathbf{1}_{\{X=x_0\}}]-c\mathbb{E}[\mathbf{1}_{\{X=x_0\}}]=\mathbb{E}[(f(Y)-c)\mathbf{1}_{\{X=x_0\}}] $$
∎
If you didn't see measure theory then the question only makes sense if we assume that the event $\{X=x_0\}$ have non-zero probability. In this case the above reduces to
$$ \mathbb{E}[f(Y)\mathbf{1}_{\{X=x_0\}}]=\mathbb{E}[f(Y)|X=x_0]\Pr [X=x_0]=c \Pr [X=x_0]=c\mathbb{E}[\mathbf{1}_{\{X=x_0\}}] $$
where the result follows again.