The sum of squares is a function used in statistical analysis to measure variation within a data set. The sum of squares function is unscaled, meaning that as more data points are added, the number will be larger. The sum of squares is used in calculating the standard deviation, which is a scaled method of comparing variance between data sets. To calculate the sum of squares, you need to know the data set you are considering and the average of all the values in the data set.

Calculate the average of your data set by dividing the sum of all the numbers by the number of items in your data set. For example, if your data set is {6, 7, 8, 12, 16, 17}, the total is 66 and the average is 11.

Calculate the difference between each number in the data set and the average. In this example, 6 minus 11 is -5, so the first number is -5. The other numbers are -4, -3, 1, 5, and 6.

Square each of these numbers. For example, -5 squared is 25. The other numbers squared are 16, 9, 1, 25 and 36.

Add these squared numbers to calculate the sum of squares. In this example, add 25, 16, 9 , 1, 25 and 36 to find that the sum of squares equals 112.