# How does this expected value translate into a conditional variance?

I'm working with a simple local level model in a textbook \begin{align} y_t &= \alpha_t + \epsilon_t, \qquad \epsilon_t \sim N(0, \sigma_\epsilon^2) \\ \alpha_{t+1} &= \alpha_t + \eta_t, \qquad \eta_t \sim N(0, \sigma_\eta^2) \end{align}

The conditional distribution of $\alpha_t$ given $Y_{t-1}$ (the set of all observations $y_j$ where $1 \leq j \leq t-1$) is $N(a_t, P_t)$, where we have $a_t = E(\alpha_t \mid Y_{t-1})$ and $P_t = Var(\alpha_t \mid Y_{t-1})$.

The book includes this calculation: $$E[\alpha_t(\alpha_t - a_t)] = E[Var(\alpha_t \mid Y_{t-1})] = P_t$$

I don't understand where this first equality comes from. Working backwards from the law of conditional variance, I know that

\begin{align} Var(\alpha_t \mid Y_{t-1}) &= E[ (\alpha_t - E[\alpha_t \mid Y_{t-1}])^2\mid Y_{t-1}] \\ &= E[ (\alpha_t - a_t)^2 \mid Y_{t-1}] \\ &= E[ (\alpha_t^2 - 2 \alpha_t a_t + a_t^2) \mid Y_{t-1}] \\ &= E[\alpha_t^2 \mid Y_{t-1}] - 2E[\alpha_t a_t \mid Y_{t-1}] + E[a_t^2 \mid Y_{t-1}] \\ \end{align}

but I don't see how to get $\alpha_t (\alpha_t - a_t)$ from this, which would give me the correct value inside the expectation.

For any two random variables $X$ and $Y$, we always have: $$V(Y)=E[V(Y|X)]+V[E(Y|X)].$$ Now in above formula let $Y=\alpha_t$ and $X=Y_{t-1}$ to have: $$V[\alpha_t]=E[V(\alpha_t|Y_{t-1})]+V[E(\alpha_t|Y_{t-1})]=E[\alpha_t^2]-E^2[\alpha_t]$$ Hence $$V[\alpha_t]=E[V(\alpha_t|Y_{t-1})]+V[a_t]=E[\alpha^2_t]-E^2[\alpha_t]$$ So $$E[V(\alpha_t|Y_{t-1})]=E[\alpha^2_t]-E^2[\alpha_t]-V[a_t]=E[\alpha^2_t]-E^2[\alpha_t]-E[a^2_t]+E^2[a_t] \quad (1)$$ Now take expected value from both sides of $a_t=E[\alpha_t|Y_{t-1}]$ to have: $$E[a_t]=E\big[E[\alpha_t|Y_{t-1}]\big]=E[\alpha_t].$$ So $$E[\alpha_t]=E[a_t] \quad (2)$$ Next use (2) in (1) to have: $$E[V(\alpha_t|Y_{t-1})]=E[\alpha^2_t]-E^2[\alpha_t]-E[a^2_t]+E^2[\alpha_t]=E[\alpha^2_t]-E[a^2_t] \quad (3)$$ Note that $$E[\alpha_ta_t]=E\big[E[\alpha_ta_t|Y_{t-1}]\big]=E[a_tE\big[\alpha_t|Y_{t-1}]\big]=E[a^2_t] \quad (4)$$ Finally use (4) in (3) i.e. replace $E[a^2_t]$ with $E[\alpha_ta_t]$ in (3) to have: $$E[V(\alpha_t|Y_{t-1})]=E[\alpha^2_t]-E[\alpha_ta_t]=E[\alpha_t(\alpha_t-a_t)].$$
• Shouldn't the inline equation before (2) be $a_t = E[\alpha_t \mid Y_{t-1}]$? I think you switched $\alpha_t$ and $a_t$ in that one. – M T Mar 16 '15 at 14:39
• Actually, maybe that's correct (it seems that equation is necessary), but can you explain why we can say that $\alpha_t=E[a_t\mid Y_{t-1}]$? We're given that $a_t = E[\alpha_t \mid Y_{t-1}]$, but I don't see how that translates to the equation you gave. – M T Mar 16 '15 at 15:10
• That wasn't the equation I was talking about. It's this one: $\alpha_t = E[a_t \mid Y_{t-1}]$. I think the $\alpha_t$ and the $a_t$ are switched, because we're given that $a_t = E[\alpha_t \mid Y_{t-1}]$, not the other way around. Can you explain why $\alpha_t = E[a_t \mid Y_{t-1}]$, when we're given that $a_t = E[\alpha_t \mid Y_{t-1}]$? – M T Mar 16 '15 at 15:31
• In equation (4), why can you factor the $a_t$ out of the conditional expectation to get $E\big[E[\alpha_ta_t|Y_{t-1}]\big]=E[a_tE\big[\alpha_t|Y_{t-1}]\big]$? – M T Mar 16 '15 at 16:01