Calculation of SS (Sum of Squares)