I'm having trouble understanding a certain equation in a paper I'm reading.
- Let $A, B, C$ be random variables and let $\mathcal{B}$ be the range of $B$.
- Let $\mathbb{E}$ be the expected value an $\mathbb{P}$ a probability measure.
- Let $\mathbb{1}_{X=x}$ the indicator function that is $1$ iff $X$ takes on value $x$ and $0$ otherwise.
The claim seems to be that, almost surely (original statement given below) $$ \mathbb{E}[A | B, C] = \sum_{b \in \mathcal{B}} \frac{\mathbb{E}[A \cdot \mathbb{1}_{B=b} | C]}{\mathbb{P}[B=b | C]} \mathbb{1}_{B=b} $$
I'm having trouble seeing why this statement is true, let alone proving it. To begin with, I am unsure what we even mean with conditioning an expectation on a random variable, i.e. writing $\mathbb{E}[A|B]$. I've seen conditioning on a concrete value of a random variable, i.e. $\mathbb{E}[A|B=b]$; or conditioning on an event, i.e. $\mathbb{E}[A|\{B=b\}]$ (which is probably the same thing.)
Further, what does "almost surely" mean here? Does this mean that the "probability" of this equivalence is 1? What would that mean?
I've tried applying definitions of conditional probability, expectation and the fact that $\mathbb{E}[\mathbb{1}_{B=b}] = \mathbb{P}[B=b]$ but I'm not really getting anywhere. Would appreciate if anyone could help me unwrap this.
Full statement from Scornet2015 - Consistency of Random Forests: Let $Z_{i,j} = (Z_{i}, Z_{j})$ be another random variable.
... Thus, almost surely, $$ \begin{aligned} \mathbb{E}\left[Y_i\right. & \left.-m\left(\mathbf{X}_i\right) \mid Z_{i, j}, \mathbf{X}_i, \mathbf{X}_j, Y_j\right] \\ & =\sum_{\ell_1, \ell_2=1}^2 \frac{\mathbb{E}\left[\left(Y_i-m\left(\mathbf{X}_i\right)\right) \mathbb{1}_{Z_{i, j}=\left(\ell_1, \ell_2\right)} \mid \mathbf{X}_i, \mathbf{X}_j, Y_j\right]}{\mathbb{P}\left[Z_{i, j}=\left(\ell_1, \ell_2\right) \mid \mathbf{X}_i, \mathbf{X}_j, Y_j\right]} \mathbb{1}_{Z_{i, j}=\left(\ell_1, \ell_2\right)} \end{aligned} $$