Let $X,Y,Z$ be mutually independent random variables with range $\mathcal{R}$. Let $f$ be a measurable function from $\mathcal{R}\times\mathcal{R}$ to $\{0,1\}$.
Is it then true that
$E[f(X,Y)f(X,Z)\mid X] = E[f(X,Y)\mid X]\cdot E[f(X,Z)\mid X]$ ?
I feel like this must be true because, informally, "given $X$, $f(X,Y)$ and $f(X,Z)$ are functions of independent random variables, hence independent (given $X$)".
But these are just intuitive words. I'm having a hard time proving this from the definition of conditional expectation.
By definition, I want to show that for every $\sigma(X)$-measurable set $H$ we have
$\int_{H}f(X,Y) f(X,Z) dP = \int_{H}E[f(X,Y)\mid X]\cdot E[f(X,Z)\mid X] dP$.
I'm looking for a proof either by more basic properties of the conditional expectation, or by definition.
Best Answer
Let us work in a probability space $(\Omega, \Sigma, \mathbb{P})$ and suppose
$$X : (\Omega, \Sigma) \to (\Lambda, \mathcal{F})$$ $$Y : (\Omega, \Sigma) \to (\Gamma, \mathcal{G})$$ $$Z : (\Omega, \Sigma) \to (\Gamma, \mathcal{G})$$
are mutually independent random variables. Define
$$f(u, v) = \mathbf{1}_{F \times G}(u, v) = \mathbf{1}_{F}(u) \mathbf{1}_{G}(v)$$
with $F \in \mathcal{F}$ and $G \in \mathcal{G}$. Observe
\begin{aligned} \mathbb{E}\left[ f(X, Y) f(X, Z) \mid X \right] &= \mathbb{E}\left[ \mathbf{1}_{F}(X) \mathbf{1}_G(Y) \mathbf{1}_{F}(X) \mathbf{1}_G(Z) \mid X \right] \\ &\overset{(1)}{=} \mathbf{1}_{F}(X) \mathbf{1}_{F}(X) \mathbb{E}\left[\mathbf{1}_G(Y) \mathbf{1}_G(Z) \mid X \right] \\ &\overset{(2)}{=} \mathbf{1}_{F}(X) \mathbf{1}_{F}(X) \mathbb{E}\left[\mathbf{1}_G(Y) \mathbf{1}_G(Z) \right] \\ &\overset{(3)}{=} \mathbf{1}_{F}(X) \mathbf{1}_{F}(X) \mathbb{E}\left[\mathbf{1}_G(Y) \right] \mathbb{E}\left[ \mathbf{1}_G(Z) \right] \end{aligned}
The numbered equalities are justified at the end. Furthermore we have
$$\mathbb{E}\left[ f(X, Y) \mid X \right] = \mathbb{E}\left[ \mathbf{1}_{F}(X) \mathbf{1}_G(Y) \mid X \right] \overset{(1)}{=} \mathbf{1}_{F}(X) \mathbb{E}\left[ \mathbf{1}_G(Y) \mid X \right] \overset{(4)}{=} \mathbf{1}_{F}(X) \mathbb{E}\left[\mathbf{1}_G(Y) \right]$$ $$\mathbb{E}\left[ f(X, Z) \mid X \right] = \mathbb{E}\left[ \mathbf{1}_{F}(X) \mathbf{1}_G(Z) \mid X \right] = \mathbf{1}_{F}(X) \mathbb{E}\left[ \mathbf{1}_G(Z) \mid X \right] = \mathbf{1}_{F}(X) \mathbb{E}\left[\mathbf{1}_G(Z) \right]$$
so evidently
$$\mathbb{E}\left[ f(X, Y) f(X, Z) \mid X \right] = \mathbb{E}\left[ f(X, Y) \mid X \right] \mathbb{E}\left[ f(X, Z) \mid X \right]$$
Proof of $(1)$. It suffices to show $\mathbf{1}_{F}(X)$ is $\sigma(X)$-measurable. For any Borel set $A \in \mathcal{B}_{\mathbb{R}}$
$$\mathbf{1}_{F}(X)^{-1}(A) = \left( X^{-1} \circ \mathbf{1}_F^{-1} \right)(A) = X^{-1}\left( \left\{ u \in \Lambda : \mathbf{1}_{F}(u) \in A \right\} \right)$$
We can consider four cases:
$$\{0, 1\} \cap A = \varnothing \implies \left\{ u \in \Lambda : \mathbf{1}_{F}(u) \in A \right\} = \varnothing \in \mathcal{F}$$ $$\{0, 1\} \cap A = \{0\} \implies \left\{ u \in \Lambda : \mathbf{1}_{F}(u) \in A \right\} = F^\complement \in \mathcal{F}$$ $$\{0, 1\} \cap A = \{1\} \implies \left\{ u \in \Lambda : \mathbf{1}_{F}(u) \in A \right\} = F \in \mathcal{F}$$ $$\{0, 1\} \cap A = \{0, 1\} \implies \left\{ u \in \Lambda : \mathbf{1}_{F}(u) \in A \right\} = \Omega \in \mathcal{F}$$
and we conclude $\mathbf{1}_F(X)$ is $\sigma(X)$-measurable.
Proof of $(2)$. It suffices to show $\mathbf{1}_G(Y) \mathbf{1}_G(Z) \perp\!\!\!\perp X$. In particular we must prove
$$\mathbb{P}\left( A \cap B \right) = \mathbb{P}\left( A \right) \mathbb{P}\left( B \right)$$
for all $A \in \sigma\left( \mathbf{1}_G(Y) \mathbf{1}_G(Z) \right)$ and $B \in \sigma(X)$. We can identify the elements of $\sigma\left( \mathbf{1}_G(Y) \mathbf{1}_G(Z) \right)$: take any Borel set $M \in \mathcal{B}_{\mathbb{R}}$ and consider four cases
$$\{0, 1\} \cap M = \varnothing \implies \Big[ \mathbf{1}_G(Y) \mathbf{1}_G(Z) \Big]^{-1}(M) = \varnothing$$ $$\{0, 1\} \cap M = \{0\} \implies \Big[ \mathbf{1}_G(Y) \mathbf{1}_G(Z) \Big]^{-1}(M) = Y^{-1}(G^{\complement}) \cup Z^{-1}(G^\complement)$$ $$\{0, 1\} \cap M = \{1\} \implies \Big[ \mathbf{1}_G(Y) \mathbf{1}_G(Z) \Big]^{-1}(M) = Y^{-1}(G) \cap Z^{-1}(G)$$ $$\{0, 1\} \cap M = \{0, 1\} \implies \Big[ \mathbf{1}_G(Y) \mathbf{1}_G(Z) \Big]^{-1}(M) = \Omega$$
With $A \in \{\varnothing, \Omega\}$ the result is trivial so we are left with two cases to verify. By mutual independence
$$\mathbb{P}\left( Y^{-1}(G) \cap Z^{-1}(G) \cap B \right) = \mathbb{P}\left( Y^{-1}(G) \right) \mathbb{P}\left( Z^{-1}(G) \right) \mathbb{P}\left( B \right) = \mathbb{P}\left( Y^{-1}(G) \cap Z^{-1}(G) \right) \mathbb{P}\left( B \right)$$
To finish observe
$$Y^{-1}(G^{\complement}) \cup Z^{-1}(G^\complement) = \Big[ Y^{-1}(G) \cap Z^{-1}(G) \Big]^\complement$$
and
$$\mathbb{P}( A^\complement \cap B^\complement ) = \mathbb{P}( A^\complement ) \mathbb{P}( B^\complement ) \implies \mathbb{P}\left( A \cap B\right) = \mathbb{P}\left( A \right) \mathbb{P}\left( B \right)$$
Proof of $(3)$. It suffices to show $\mathbf{1}_G(Y) \perp\!\!\!\perp \mathbf{1}_G(Z)$. By $(1)$ we know $\mathbf{1}_G(Y)$ is $\sigma(Y)$-measurable and $\mathbf{1}_G(Z)$ is $\sigma(Z)$-measurable. In particular this means
$$\sigma\left( \mathbf{1}_G(Y) \right) \subseteq \sigma(Y)$$ $$\sigma\left( \mathbf{1}_G(Z) \right) \subseteq \sigma(Z)$$
and independence follows immediately.
Proof of $(4)$. It suffices to show $\mathbf{1}_G(Y) \perp\!\!\!\perp X$. By $(1)$ we know $\mathbf{1}_G(Y)$ is $\sigma(Y)$-measurable. In particular this means
$$\sigma\left( \mathbf{1}_G(Y) \right) \subseteq \sigma(Y)$$
and independence follows immediately.