If Y is partitioned by X, then by the Law of Total Probability we have: Var(Y)=Var(E[Y∣X])+E[Var(Y∣X)]