Total Sum of Squares — Definition, Formula & Example
The total sum of squares (SST) is a single number that measures how spread out the response values are around their own mean, before any regression line is used. It is the baseline variation that a regression model tries to explain.
For observed response values with sample mean , the total sum of squares is . For a least-squares line with an intercept, it splits exactly as . Here SSR is the regression (explained) sum of squares and SSE is the residual (unexplained) sum of squares. It is also called the total variation sum of squares.
Key Formula
Where:
- = the i-th observed response value
- = the mean of all n response values
- = the number of data points
- = regression sum of squares, the variation explained by the line
- = sum of squared residuals, the variation the line leaves unexplained
- = coefficient of determination, the fraction of SST explained by the line
Worked Example
Problem: A runner records her Saturday run for 4 weeks. Week = 1, 2, 3, 4 gives distances = 3, 7, 5, 9 miles. The least-squares line is , and its sum of squared residuals is SSE = 7.2. Find SST and use it to find .
Step 1: Find the mean of the y-values only. SST never uses the x-values or the line.
Step 2: Subtract the mean from each y-value, square each deviation, and add the squares.
Step 3: Compare the leftover variation (SSE) with the total variation (SST).
Answer: SST = 20 (in units of miles squared). The line explains 20 − 7.2 = 12.8 of that variation, so : week number accounts for 64% of the variation in distance.
Why It Matters
SST is the denominator of , the fit statistic that graphing calculators and statistics software report for a least-squares line. Because SST depends only on the y-values, it stays the same when you compare different models fit to the same data. That shared baseline is what lets you compare their fits fairly.
Common Mistakes
Mistake: Subtracting the predicted values instead of the mean when computing SST.
Correction: Using gives SSE, the unexplained variation. SST measures distance from the horizontal line , so always subtract the mean.
