Law of total covariance
In probability theory, the law of total covariance, covariance decomposition formula, or conditional covariance formula states that if X, Y, and Z are random variables on the same probability space, and the covariance of X and Y is finite, then cov ( X , Y ) = E ( cov ( X , Y ∣ Z ) ) + cov ( E ( X ∣ Z ) , E ( Y ∣ Z ) ) . {\displaystyle \operatorname {cov} (X,Y)=\operatorname {E} (\operatorname {cov} (X,Y\mid Z))+\operatorname {cov} (\operatorname {E} (X\mid Z),\operatorname {E} (Y\mid Z)).} The nomenclature in this article's title parallels the phrase law of total variance.