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 = mnPopulation Variance (SS/n)
pop_var = (pow(v1 - mn, 2) + pow(v2 - mn, 2) + pow(v3 - mn, 2) + pow(v4 - mn, 2)) / 4Variables
| Variable | Description | Default |
|---|---|---|
v1 | Value 1 | 3 |
v2 | Value 2 | 5 |
v3 | Value 3 | 7 |
v4 | Value 4 | 9 |
mn | Derived value= (v1 + v2 + v3 + v4) / 4 | calculated |
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.
Worked Example
Find the sum of squares for 3, 5, 7, 9.
v1 = 3v2 = 5v3 = 7v4 = 9
- 01Mean = (3 + 5 + 7 + 9) / 4 = 24 / 4 = 6
- 02Deviations: 3-6=-3, 5-6=-1, 7-6=1, 9-6=3
- 03Squared deviations: 9, 1, 1, 9
- 04SS = 9 + 1 + 1 + 9 = 20
Ready to run the numbers?
Open Sum of Squares Calculator