How to Calculate the Sum of Squares?

••• arthobbit/iStock/GettyImages

The sum of squares is a tool statisticians and scientists use to evaluate the overall variance of a data set from its mean. A large sum of squares denotes a large variance, which means that individual readings fluctuate widely from the mean.

This information is useful in many situations. For example, a large variance in blood pressure readings over a specific period of time could point to an instability in the cardiovascular system that needs medical attention. For financial advisors, a large variance in daily stock values signifies market instability and higher risks for investors. When you take the square root of the sum of squares, you get the standard deviation, an even more useful number.

Finding the Sum of Squares

    The number of measurements is the sample size. Denote it by the letter "​n​."

    The mean is the arithmetic average of all the measurements. To find it, you add all the measurements and divide by the sample size, ​n​.

    Numbers larger than the mean produce a negative number, but this doesn't matter. This step produces a series of n individual deviations from the mean.

    When you square a number, the result is always positive. You now have a series of n positive numbers.

    This final step produces the sum of squares. You now have a standard variance for your sample size.

Standard Deviation

Statisticians and scientists usually add one more step to produce a number that has the same units as each of the measurements. The step is to take the square root of the sum of squares. This number is the standard deviation, and it denotes the average amount each measurement deviated from the mean. Numbers outside the standard deviation are either unusually high or unusually low.


Suppose you measure the outside temperature every morning for a week to get an idea of how much the temperature fluctuates in your area. You get a series of temperatures in degrees Fahrenheit that looks like this:

Mon: 55, Tues: 62, Wed: 45, Thurs: 32, Fri: 50, Sat: 57, Sun: 54

To calculate the mean temperature, add the measurements and divide by the number you recorded, which is 7. You find the mean to be 50.7 degrees.

Now calculate the individual deviations from the mean. This series is:

50.7 - 55 = -4.3 \\ 50.7 -62 = −11.3 \\ 50.7 -45 = 5.7 \\ 50.7 - 32 = 18.7 \\ 50.7 -50 = 0.7 \\ 50.7 - 57 = −6.3 \\ 50.7 - 54 = −2.3

Square each number:

-4.3^2 = 18.49 \\ −11.3^2 = 127.69 \\ 5.7^2 = 32.49\\ 18.7^2 = 349.69 \\ 0.7^2 = 0.49\\ −6.3^2 = 39.69 \\ −2.3^2 = 5.29

Add the numbers and divide by (​n​ − 1) = 6 to get 95.64. This is the sum of squares for this series of measurements. The standard deviation is the square root of this number, or 9.78 degrees Fahrenheit.

It's a fairly large number, which tells you that temperatures varied quite a bit over the week. It also tells you that Tuesday was unusually warm while Thursday was unusually cold. You could probably feel that, but now you have statistical proof.

Related Articles

Montessori-Inspired Toys & Kits for Your Little Scientist
How to Calculate the Mean Annual Temperature
How to Find a Relative Average Deviation
How to Calculate a Temperature Range
How to Calculate Variance From Standard Error
How to Calculate an RMS
How to Calculate Standard Errors
How to Calculate CV Values
Define Mean for Math
How to Convert 220 Celsius to Fahrenheit
How to Estimate the True Proportion
How to Calculate Standard Error of The Mean
How to Calculate MSE
How to Calculate Skew
How to Calculate Average Temperature
How to Calculate Probability for Weather
How to Convert Celsius to Fahrenheit for 5th Grade
How to Calculate Unexplained Variance
How to Calculate Statistical Mean
How to Calculate the Root MSE in ANOVA
How to Calculate Relative Dispersion