Checking why group variances cannot simply be averaged
Two groups can each have zero variance and still combine into a list with a large variance. This guide pools 0, 0 with 10, 10 to show where the extra variation comes from.
Two flat groups, one spread-out list
Group one is 0, 0 and group two is 10, 10. Inside each group every value equals the group mean, so the population variance of each is zero. Averaging those two zeros gives zero. Now pool all four values into 0, 0, 10, 10. The mean is 5, the squared deviations are 25 for every value, and the population variance is 100/4 = 25. A reader who averaged the group variances would report 0 for data that plainly vary from 0 to 10. The page confirms each number with the variance calculator in population mode: 0, 0 and 0, then 25 for the pooled list.
The law of total variance
The gap is explained by an identity. The total variance of pooled data equals the average within-group variance plus the variance of the group means around the overall mean. For the example, the within part is the average of 0 and 0, which is 0. The group means are 0 and 10, the overall mean is 5, and the variance of the group means is (25 + 25)/2 = 25. Total variance is 0 + 25 = 25, which matches the direct calculation. This decomposition, equal sizes assumed here, is the basis of analysis of variance, where the split between within-group and between-group parts is used to judge whether group means differ.
A second pooled example
Use group A as 0, 10 and group B as 20, 30. Each group has mean values 5 and 25. Each group has a population variance of 25, since the deviations are 5 and -5. The average of the group variances is 25. Pooling gives 0, 10, 20, 30, with a mean of 15 and deviations of -15, -5, 5, 15 whose squares are 225, 25, 25 and 225, so the variance is 500/4 = 125. The between-group part is the variance of the means 5 and 25 around 15, which is 100, and 25 + 100 = 125. The within-group figure alone, 25, would understate the pooled spread by a factor of five.
Why counts and means are needed
A set of group variances does not carry enough information to rebuild the pooled value. Two collections with the same variances can have very different means, as the first example shows when group two is shifted from 10, 10 to 100, 100 and the pooled variance jumps while the group variances stay at zero. To pool correctly you need for each group its size, its mean and its variance. With those three numbers the pooled population variance is the size-weighted average of the group variances plus the size-weighted variance of the group means. Statistical software that combines partitions of data, such as parallel algorithms, uses exactly these quantities. Chan, Golub and LeVeque published the standard pairwise formula for merging partial means and sums of squares in 1979, and streaming systems that compute variance across many machines rely on the same idea. Keeping only the variance of each partition would lose the information needed to merge them.
Population and sample denominators
This page uses population variance, with a denominator of n, throughout. Sample variance divides by n - 1 to correct for estimating the mean from the data. For the pooled list 0, 0, 10, 10 the sum of squared deviations is 100, so the sample variance is 100/3, about 33.33, against a population variance of 25. Mixing the two conventions within one calculation is a frequent source of wrong totals. When groups of sample data are pooled for a test, formulas such as the pooled variance in a two-sample t test weight sample variances by n - 1, and they assume the group variances are equal, which is a separate modeling assumption.
A name collision: pooled variance in tests
The term pooled variance also names a quantity from the equal-variance two-sample t test. There, the pooled variance is the weighted average of the two sample variances using n - 1 weights. That quantity deliberately measures only within-group spread, because the test is asking whether the group means differ, and the between-group difference is the signal. The pooled variance of the combined list, discussed here, is the total spread of all the data. The same words describe two different calculations, and which one applies depends on whether you want to compare groups or describe the combined data.
Unequal group sizes
The decomposition needs weights when groups differ in size. Let group one be 0, 0, 0 and group two be 10. The group variances are both zero. The pooled list 0, 0, 0, 10 has a mean of 2.5, and its squared deviations are 6.25 three times and 56.25 once, which add up to 75, so the population variance is 75/4 = 18.75. The between-group part is the weighted variance of the means: three quarters of the data sit 2.5 below the overall mean and one quarter sits 7.5 above, giving 0.75 × 6.25 + 0.25 × 56.25 = 18.75. The weights are the group shares of the data, and an unweighted variance of the two group means, 0 and 10, would give 25, which is wrong for this pooled list.
Where this matters in practice
Combining regional or period summaries is the common case. A company with one site where daily output is steady near 100 units and another steady near 200 might report a variance near zero for each site, yet the combined output varies greatly from day to day depending on which site a record came from. A report of the average within-site variance would miss it. In grading, a class whose sections differ in average score has a combined variance larger than the section variances suggest. Whenever data come from groups with different levels, the between-group part belongs in any statement about total variation. The same reasoning applies to time: a series whose level shifts partway through, such as monthly sales before and after a price change, has a total variance that includes the shift, and the variance computed separately on each half does not.
Scope of the control
The example is built on purpose: constant groups isolate the between-group term. It does not say that between-group variation is a flaw. In many studies it is the effect of interest. It uses population denominators for finite lists and does not give a rule for sample pooling. Keep group sizes, means and variances together whenever you may need to combine summaries later.
Reproduce the checks
First group variance
Open the Variance Calculator and enter:
- Numbers
0,0- Calculation mode
population
Expected output:
Variance
0Every observation in the first group is identical.
Second group variance
Open the Variance Calculator and enter:
- Numbers
10,10- Calculation mode
population
Expected output:
Variance
0The other group is also constant.
Combined population variance
Open the Variance Calculator and enter:
- Numbers
0,0,10,10- Calculation mode
population
Expected output:
Variance
25The differing group means create pooled variation.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.
Sources
- Primary definition and convention reference ↗ · 2026-10-08