I'd like to be able to calculate the sample variance for a subpopulation [B] given the sample mean and variance for its complement [A] and the overall population [A+B].
I have the sample mean and variance for
- Overall population [A+B]
- Subpopulation [A]
I know I can calculate the mean for B as:
mean[B] = ( mean[A+B] * (n[A] + n[B]) - mean[A] * n[B]) / nB
But I don't know if it's easy to calculate the sample variance for the complement in a similar way.