Sum of squared deviations calculator