List of formulas for total, within-group and between-group variance:
- Total variance (S²):
[
S^2 = \frac{1}{N} \sum_{i=1}^{N} (X_i – \bar{X})^2
]
where (N) is the total number of observations, (X_i) is each observation, (\bar{X}) is the mean of all observations. - Within-group variance (S² within):
[
S^2_{\text{within}} = \frac{1}{N_k – 1} \sum_{k=1}^{K} \sum_{i=1}^{N_k} (X_{ik} – \bar{X} k)^2 ] where (K) is the number of groups, (N_k) is the number of observations in group (k), (X {ik}) is each observation in group (k), (\bar{X}_k) is the mean of group (k). - Between-group variance (S² between):
[
S^2_{\text{between}} = \frac{1}{K – 1} \sum_{k=1}^{K} N_k (\bar{X}_k – \bar{X})^2
]
where (\bar{X}_k) is the mean of group (k), (\bar{X}) is the overall mean, (N_k) is the number of observations in group (k).