The decomposition of variance formula is:
`V(Y) = E[V(Y|X)] + V(E[Y|X])`
The proof is given in Lecture Note 7. It might be useful to outline the overall logic of the proof:
First, we show that `E[h(Y,X)g(X)] = 0`
Then, from this we get that `Cov[ h(Y,X), g(X)] =0`
Next, we turn to the variance of `Y`. We note that
`V(Y) = V(h(Y,X)+g(X)) = V(h(Y,X))+V(g(X)) + 2 Cov(h(Y,X),g(X)).`
- Since we have already shown that the last term is 0, we just need to manipulate the first two terms to get the decomposition formula.