Sum of squares
Sum of squares decomposes total variation in a dataset into an explained part (SSR) and an unexplained part (SSE); it is the building block behind R-squared, ANOVA and the F-test.
See it move
Four months of advertising spend and sales give total sum of squares SST = 13.0. The fitted regression line explains SSR = 12.8 of that variation, leaving SSE = 0.2 unexplained — and 12.8 + 0.2 reproduces the 13.0 total exactly, since SST always equals SSR plus SSE.
The formula
Variables
- Total sum of squares (squared units of y)
- Regression (explained) sum of squares (squared units of y)
- Error (unexplained) sum of squares (squared units of y)
The core decomposition: total variation in the outcome splits exactly into an explained part and an unexplained part.
Variables
- Actual observed value
- Fitted (predicted) value from the regression
- Mean of the observed y values
Defines each sum of squares from the actual, fitted and mean values of the outcome variable.
Check yourself
A simple regression of exam score on study hours for four students produces SST = 725 and SSE = 5. What is SSR, and what does it represent?