Sum of Squares Calculator Formula

Understand the math behind the sum of squares calculator. Each variable explained with a worked example.

Formulas Used

Sum of Squares (SS)

ss = pow(v1 - mn, 2) + pow(v2 - mn, 2) + pow(v3 - mn, 2) + pow(v4 - mn, 2)

Mean

mean_val = mn

Population Variance (SS/n)

pop_var = (pow(v1 - mn, 2) + pow(v2 - mn, 2) + pow(v3 - mn, 2) + pow(v4 - mn, 2)) / 4

Variables

VariableDescriptionDefault
v1Value 13
v2Value 25
v3Value 37
v4Value 49
mnDerived value= (v1 + v2 + v3 + v4) / 4calculated

How It Works

How to Calculate the Sum of Squares

Formula

SS = Sum of (xi - mean)^2

For each value, subtract the mean, square the result, and add them up. The sum of squares quantifies total variability in the data and is the numerator in variance calculations.

  • Population Variance = SS / n
  • Sample Variance = SS / (n - 1)
  • Worked Example

    Find the sum of squares for 3, 5, 7, 9.

    v1 = 3v2 = 5v3 = 7v4 = 9
    1. 01Mean = (3 + 5 + 7 + 9) / 4 = 24 / 4 = 6
    2. 02Deviations: 3-6=-3, 5-6=-1, 7-6=1, 9-6=3
    3. 03Squared deviations: 9, 1, 1, 9
    4. 04SS = 9 + 1 + 1 + 9 = 20

    Ready to run the numbers?

    Open Sum of Squares Calculator