Returns the sum of squares of deviations