Law of Total Variance Using Three Different Variables

statistics

I have 3 random variables; X,Y, and Z. I am pretty familiar with law of total variance for two variables;

$Var(X) = E[Var(X|Y)] + Var[E(X|Y)]$.

(I'm sorry if the words are messy).

Recently, I read some papers, which state law of total variance using three variables

$Var(X) = E[Var(X|Y,Z)] + Var[E(X|Y,Z)]$

Here what I have got so far. First, I try to find $E[Var(X|Y,Z)]$ like this:

$Var[X|Y,Z] = E[(X-E(X|Y,Z))^2|Y,Z]=E[X^2|Y,Z]-(E[X|Y,Z])^2$

$E[Var(X|Y,Z)] = E[E[X^2|Y,Z]-(E[X|Y,Z])^2]$

Then, using definition of variance, I find:

$Var[E(X|Y,Z)]=E[(E[X|Y,Z])^2]]-(E[E[X|Y,Z]])^2$

Finally, the result I have now

\begin{align}
E[Var(X|Y,Z)] + Var[E(X|Y,Z)] &= E[E[X^2|Y,Z]]-(E[X|Y,Z])^2]+E[(E[X|Y,Z])^2]-(E[E[X|Y,Z]])^2 \\
&= E[E[X^2|Y,Z] ]-(E[E[X|Y,Z]])^2
\end{align}

After this, I try to use a property for expectation where

$E(E[X|Y,Z]|Z)=E(X|Y)$. But I am not sure if I go the right way and I am not even sure by now if the law of total variance can be used that way. Any kind of help would be appreciated. Thanks!

Best Answer

You have : $$E\big(E[X|Y,Z]\big|Y,Z\big) = E(X)$$ This is just the usual property, applied with the random variable $(Y,Z)$, or if you want, you can rederive it like this : \begin{align} E[E[X|Y,Z]] &= E[ E [E [X|Y,Z]|Z]] \\ &= E[E[X|Y]] \\ &= E[X] \end{align}

Related Question