Variance as a sum of conditional variances

So, for a random variable $X$ and an event $A$, the following expression of the mean value of $X$ as a sum of conditional expectations is valid, or at least, i could prove it for discrete random variables:

$$E(X) = E(X|_A) P(A) + E(X|_{A^c})(1-P(A))$$

My question is, is there a similar expression for variances? I remember my teacher using such a thing once, something like:

$$Var(X) = Var(X|_A) P(A) + Var(X|_{A^c})(1-P(A)) + \ ...$$

but i forgot it and i can't find it anywhere. Even the one above, i haven't found it anywhere i looked.

• In full generality, $$\mathrm{Var}(X\mid A)+\mathrm{Var}(X\mid A^c)=E(X^2)-E(X\mid A)^2P(A)-E(X\mid A^c)^2P(A^c)\ne\mathrm{Var}(X)$$
– Did
Commented Oct 3, 2016 at 14:26

If you mean total probability theorem, using the law of total variance, we have: $$\mathrm{Var(X)} = \mathrm{E}[\mathrm{Var}(X|A)] + \mathrm{Var}(\mathrm{E}[X|A]) .$$ It is somehow well-known equation, therefore, I don't include the proof. Hope that helps!
• Of couse this identity is concerned with the case when $A$ is a sigma-algebra and fails when $A$ is an event (such that $P(A)\ne1$).