Conditional expectation $\mathbb E[X \vert Y]$ represents the expected value of a [[Random Variable]] $X$, given the information about another r.v. $Y$. It can be expressed in two forms:
- *Functional form:* Treats the conditional expectation as a function of a r.v. $Y$, denoted $g(Y)$.
$
\begin{align}
g(5) &= \mathbb E [X \vert Y=5] \\[2pt]
g(y) &= \mathbb E [X \vert Y=y] \\[2pt]
g(Y) &= \mathbb E[X \vert Y]
\end{align}
$
- *Numerical form:* Evaluates the conditional expectation for a specific value $Y=y$, which results in a single number.
$ \mathbb E[X\vert Y=y]=8$
## Properties of Conditional Expectation
**Property 1:** Scaling conditional expectation by a function of the condition $Y$.
$ \mathbb E[g(Y)*X \vert Y] =g(Y)*\mathbb E[X\vert Y]$
Derivation: When $Y$ takes on a specific value $y$, then the function $g(Y=y)$ returns a constant. The constant can be pulled out of the expectation. This is true for all $y \in Y$.
$
\begin{align}
\mathbb{E}[g(Y)*X \vert Y]&=\mathbb{E}[g(Y=y)*X \vert Y=y], \quad \forall y \in Y\\[2pt]
\mathbb{E}[g(y)*X \vert Y]&= g(y)*\mathbb{E}[X \vert Y=y]
\end{align}
$
**Property 2:** Conditioning conditional expectation on a function of $Y$.
$
\begin{align}
\mathbb E[X \vert Y] &= \mathbb E[X \vert h(Y)] \\[4pt]
\mathbb E[X \vert Y=y] &= \mathbb E[X \vert h(Y)=h(y)]
\end{align}
$
The above is true for [[Invertible Functions]]. Let the function $h(Y)=Y^3$. We claim that conditioning on $Y=2$ is the same as conditioning on $h(Y) = 8$.