The sum of squared deviations (SSD) measures how spread out a set of numbers is around its mean. To find it, calculate the mean, subtract the mean from each value to get a deviation, square each deviation, and add them all up. The result is always zero or positive, and a larger value means the data points are more spread out. You can compute it by hand, in a spreadsheet, or with a calculator; the steps below walk through the manual method and the common shortcuts.
What You'll Need
- A set of numerical data (at least two values; more is better for meaningful spread)
- The formula: SSD = Σ(xᵢ − x̄)², where x̄ is the mean
- A calculator or spreadsheet for squaring and summing
- Paper and pencil if working by hand, to avoid arithmetic slips
Step-by-Step
- List all data values. Write them in a column so you can work through them one by one. For example: 4, 8, 6, 5, 7.
- Count the values (n). In the example, n = 5. You will need n for the mean and, later, for the variance if you go that far.
- Find the mean (x̄). Add all values and divide by n. Sum = 4 + 8 + 6 + 5 + 7 = 30; mean = 30 ÷ 5 = 6.
- Subtract the mean from each value to get deviations. For each number, compute xᵢ − x̄. In the example: 4 − 6 = −2; 8 − 6 = 2; 6 − 6 = 0; 5 − 6 = −1; 7 − 6 = 1. Check that the deviations sum to zero: −2 + 2 + 0 + (−1) + 1 = 0. If they do not, you have made an arithmetic error.
- Square each deviation. Multiply each deviation by itself. Squaring removes the sign and gives extra weight to larger deviations. Example: (−2)² = 4; 2² = 4; 0² = 0; (−1)² = 1; 1² = 1.
- Add the squared deviations. Sum the squared values: 4 + 4 + 0 + 1 + 1 = 10. This is the sum of squared deviations (also called the sum of squares, SS).
- Interpret the result. SSD = 10 for this data set. Because it depends on the number of values and the units, it is often converted to variance (SSD ÷ n for a population, or SSD ÷ (n − 1) for a sample) and then to standard deviation (the square root of variance). For the sample here, variance = 10 ÷ 4 = 2.5 and standard deviation ≈ 1.58.
Common Mistakes
- Squaring before subtracting. The order matters: (xᵢ − x̄)² is not the same as xᵢ² − x̄². Always subtract first, then square.
- Forgetting to square negative deviations. A deviation of −3 becomes 9, not −9. Dropping the square turns the sum into zero or a misleading number.
- Using the wrong mean. If you round the mean too early, every deviation shifts slightly and the final SSD can be off. Keep at least one extra decimal place during intermediate steps.
- Mixing up population and sample formulas. The SSD itself is the same in both cases; the difference appears when you divide by n (population variance) or n − 1 (sample variance). Do not divide the SSD by anything unless you specifically want variance.
- Arithmetic slips when summing. Add the deviations first to confirm they total zero; that quick check catches many errors before you square.
Tips
- Use the computational formula SSD = Σxᵢ² − (Σxᵢ)²/n as a cross-check. It often produces the same result with less rounding error, though it can suffer from cancellation when numbers are large.
- In a spreadsheet, enter the data in a column, use =AVERAGE(range) for the mean, then =SUMSQ(range minus mean) or =DEVSQ(range). DEVSQ returns the sum of squared deviations directly.
- Keep units in mind: SSD is in squared units of the original data, which is why standard deviation (its square root) is often easier to interpret.
- For large data sets, work in a table with columns for x, deviation, and squared deviation; this makes errors easy to spot.
Troubleshooting
- Your deviations do not sum to zero. Recheck the mean and each subtraction. A single typo in one value will throw off the mean and every deviation.
- The SSD is negative. This is impossible with the definition formula; it usually means you subtracted squares instead of squaring differences, or made a sign error in a spreadsheet formula.
- Spreadsheet gives a different answer than your hand calculation. Check whether the spreadsheet range includes a text cell or a blank, and whether you used the sample or population divisor when converting to variance.
- The result seems too large or too small. Confirm the scale of the data: SSD grows with the square of the values, so data in thousands will produce very large SSD values. Compare with variance and standard deviation to sanity-check.
- You only have the mean and standard deviation. You cannot recover the exact SSD without the individual values, but if you know n and the standard deviation s, SSD = (n − 1) × s² for a sample (or n × σ² for a population).
Frequently Asked Questions
What is the difference between sum of squared deviations and variance?
Variance is the average of the squared deviations: SSD divided by n (population) or n − 1 (sample). The SSD is the raw total before dividing.
Can the sum of squared deviations be zero?
Yes, only when every data value equals the mean, meaning all values are identical. Any variation produces a positive SSD.
Why do we square the deviations instead of taking absolute values?
Squaring makes all terms positive and gives more weight to larger deviations, which is mathematically convenient for variance and standard deviation. Absolute deviations are used in some robust measures but do not have the same algebraic properties.
Is SSD the same as sum of squares (SS) in regression?
Not exactly. In regression, “sum of squares” can refer to total, regression, or residual sums, each defined differently. The sum of squared deviations around the mean is one specific quantity, often called total sum of squares in that context.
How do I calculate SSD if I only have grouped data?
Use class midpoints as xᵢ and multiply each squared deviation by its frequency, then sum: SSD = Σfᵢ(xᵢ − x̄)². The mean is the frequency-weighted average of the midpoints.
Does SSD depend on the units of measurement?
Yes. If you change units (for example, from meters to centimeters), the SSD changes by the square of the conversion factor. Standard deviation changes by the same factor, not its square.