How can I show that:$\DeclareMathOperator{\Cov}{Cov}$
$\Cov(X,Y) = E(\Cov(X,Y\mid Z)) + \Cov(E(X\mid Z),E(Y\mid Z))$?
With $X, Y$ and $Z\;$ r.v with finite variances.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityHow can I show that:$\DeclareMathOperator{\Cov}{Cov}$
$\Cov(X,Y) = E(\Cov(X,Y\mid Z)) + \Cov(E(X\mid Z),E(Y\mid Z))$?
With $X, Y$ and $Z\;$ r.v with finite variances.
Here's a ugly looking jumble of Expectations
$$\begin{align}E[\DeclareMathOperator{\Cov}{Cov}\Cov[X,Y|Z]]&=E[E[XY|Z]-E[X|Z]E[Y|Z]]\\[2ex] &=E[E[XY|Z]]-E[E[X|Z]E[Y|Z]]\\[2ex] &=E[XY]-E[E[X|Z]E[Y|Z]] \end{align}$$ Similarly, $$\begin{align} \Cov[E[X|Z],E[Y|Z]]&=E[E[X|Z]E[Y|Z]]-E[E[X|Z]]E[E[Y|Z]]\\[2ex] &=E[E[X|Z]E[Y|Z]]-E[X]E[Y]\\[2ex] \end{align}$$
Add the two results to get the desired result. This proof utilizes the tower property. A simple version of which is $E[E[X|Y]]=E[X].$ Here is the wikipage Tower Property