How to Calculate a Sum of Squared Deviations from the Mean (Sum of Squares)

••• DragonImages/iStock/GettyImages

Concepts such as ​mean​ and ​deviation​ are to statistics what dough, tomato sauce and mozzarella cheese are to pizza: Simple in principle, but having such a variety of interrelated applications that it is easy to lose track of basic terminology and the order in which you must perform certain operations.

Calculating the sum of the squared deviations from the mean of a sample is a step along the way to computing two vital descriptive statistics: the variance and the standard deviation.

Step 1: Calculate the Sample Mean

To calculate a mean (often referred to as an average), add the individual values of your sample together and divide by ​n​, the total items in your sample. For example, if your sample includes five quiz scores and the individual values are 63, 89, 78, 95 and 90, the sum of these five values is 415, and the mean is therefore

415 ÷ 5 = 83

Step 2: Subtract the Mean From the Individual Values

In the present example, the mean is 83, so this subtraction exercise yields values of

(63-83) = -20 \\ (89-83) = 6 \\ (78-83) = -5 \\ (95-83) = 12 \\ (90-83) = 7

These values are called the deviations, because they describe the extent to which each value deviates from the sample mean.

Step 3: Square the Individual Variations 

In this case:

(-20)^2 = 400 \\ 6^2 = 36 \\ (-5)^2 = 25 \\ 12^2 =144 \\ 7^2 = 49

These values are, as you would expect, the squares of the deviations determined in the previous step.

Step 4: Add the the Squares of the Deviations

To get the sum of the squares of the deviations from the mean, and thereby complete the exercise, add the values you calculated in step 3. In this example, this value is

400 + 36 + 25 + 144 + 49 = 654

The sum of the squares of the deviations is often abbreviated SSD in stats parlance.

Bonus Round

This exercise does the bulk of the work involved in calculating the variance of a sample, which is the SSD divided by n − 1, and the standard deviation of the sample, which is the square root of the variance.

Related Articles

How to Calculate the Root MSE in ANOVA
How to Calculate a Sigma Value
How to Calculate Relative Dispersion
How to Compute a Population Mean
How to Get the Average of Decimals
How to Calculate Standard Errors
How to Calculate CV Values
How to Calculate Variance From Standard Error
How to Calculate Statistical Mean
How to Find a Z Score
How to Calculate Unexplained Variance
Math Algorithms for Elementary Students
How to Square a Mixed Fraction
How to Calculate Average Volume
How to Calculate Denominator Degrees of Freedom
How to Calculate a P-Value
How to Calculate Average Deviation From the Mean
How to Calculate Relative Standard Error
How to Calculate the Mean in a Probability Distribution
How to Calculate the Empirical Formula