Estimates from Summarized Data

The mean and the variance from coded totals.

Coded totals

Questions often give a sample only as totals, and the totals are often of coded values: a fixed number a has been subtracted from every x before adding. A typical summary is n = 10, Σ(x − 50) = 20 and Σ(x − 50)² = 130.

Coding keeps the numbers small. For readings near 50, the values x − 50 are small whole numbers, their squares are small too, and nothing is lost: every estimate can be found from the coded sums.

The mean: add a back

The mean of the coded values is Σ(x − a) / n = 20 / 10 = 2. Each coded value is 50 less than its x, so their mean is 50 less than x̄, and x̄ = 50 + 2 = 52.

In general, x̄ = a + Σ(x − a) / n. The sample mean is the unbiased estimate of the population mean μ, so the estimate of μ is 52.

The variance: unchanged by coding

Subtracting 50 from every value moves the whole data set 50 to the left. The mean moves by the same 50, so each value’s distance from the mean is what it was before. The variance is built from those distances, so x − a and x have the same variance.

That is why the variance can be found from the coded sums alone. With the sums of x − a in place of Σx and Σx², the unbiased estimate is s² = [Σ(x − a)² − (Σ(x − a))² / n] / (n − 1).

Putting in the numbers

Here (Σ(x − 50))² / n = 20² / 10 = 40, so s² = (130 − 40) / 9 = 90 / 9 = 10.

The bracket is the sum of squared deviations from the sample mean: Σ(x − 50)² measures the squares from 50, and taking off 40 moves them to the mean 52. Dividing that sum by n − 1 = 9, not by n = 10, makes the estimate unbiased.

Checked on five values

Take the sample 48, 51, 53, 55 and 58, coded with a = 50. The coded values are −2, 1, 3, 5 and 8, so Σ(x − 50) = 15 and Σ(x − 50)² = 4 + 1 + 9 + 25 + 64 = 103.

The mean is 50 + 15 ÷ 5 = 53. The variance is s² = (103 − 15² / 5) / 4 = (103 − 45) / 4 = 58 / 4 = 14.5.

Directly, the deviations from 53 are −5, −2, 0, 2 and 5, whose squares add to 25 + 4 + 0 + 4 + 25 = 58, and 58 ÷ 4 = 14.5 again.

Without coding, Σx = 265 and Σx² = 2304 + 2601 + 2809 + 3025 + 3364 = 14,103, so s² = (14,103 − 265² / 5) / 4 = (14,103 − 14,045) / 4 = 14.5. The answer is the same; the numbers along the way are much larger.

The usual mistakes

Leaving the mean coded. 20 ÷ 10 = 2 is the mean of x − 50; the mean of x is 50 + 2 = 52.

Adding the whole total to a. 50 + 20 = 70 forgets to divide Σ(x − a) by n first.

Dividing by n. (130 − 40) ÷ 10 = 9 is too small on average as an estimate of σ²; divide by n − 1 = 9.

Leaving out (Σ(x − a))² / n. 130 ÷ 9 measures the squares from 50, not from the mean 52, and comes out too large.

Coding the variance. Subtracting a from every value changes the mean by a but leaves the variance as it was; it is not a or a² smaller.

Practice Estimates from Summarized Data in the app