Calculate the sum of squared deviations from the mean, the raw sum of squares Σx², and the sum of squares about any target value you choose.
SS = Σ(x − x̄)² = Σx² − (Σx)² ÷ n
Separate values with commas, spaces or new lines.
The sum of squares (SS) adds up the squared distance of every value from the mean. It's the raw total of variation in a dataset before dividing by anything; divide by n − 1 and you have the sample variance.
It's the currency of much of statistics. ANOVA splits the total sum of squares into the part explained by the groups and the part left over. Regression splits it into the part explained by the line and the residuals, and R² is the ratio of the two.
"Sum of squares" can also mean the uncorrected Σx², the plain total of the squared values, so check which one a formula wants. This calculator gives both.
Definitions as given in the NIST/SEMATECH e-Handbook of Statistical Methods. See Sources.
Quicker by hand because you never work out individual deviations, but less accurate on a computer when the values are large and close together.
The extra term is zero only when c is the mean, so no other value gives a smaller total. That is the idea behind "least squares".
Both routes agree, and dividing by 4 gives a sample variance of 14.5. Measured from the target of 10 instead, the total rises to 63: the extra 5 is the cost of the mean being 1 away from target.
The worked example's values, with squared distances measured from different reference points. The mean always wins.
| Measured from | Sum of squares |
|---|---|
| 0 (uncorrected) | 463 |
| Median, 8 | 63 |
| Mean, 9 | 58 |
| Target, 10 | 63 |
So they don’t cancel out, and because squared deviations add up neatly, which lets ANOVA and regression split total variation into parts.
In regression, the total sum of squares (SST) splits into the regression sum of squares (SSR, explained) and the error sum of squares (SSE, residual): SST = SSR + SSE.
=DEVSQ(range) gives Σ(x − x̄)². =SUMSQ(range) gives the uncorrected Σx².
No. It’s a sum of squares, so it’s zero when every value is equal and positive otherwise.
SD = √(SS ÷ (n − 1)) for a sample. For the example, √(58 ÷ 4) = 3.81.
In quality control, the squared distance from a target value combines spread and bias in one figure. Dividing it by n gives the mean squared error.
Because the uncorrected Σx² is corrected by subtracting (Σx)² ÷ n, the correction for the mean.
No. Shifting all values moves the mean by the same amount, so every deviation stays the same. Multiplying every value by k multiplies SS by k².
Related Tools