TechBuzzPro

Regression Sum of Squares Formula & Calculation

· 5 min read · Apps & Browsers

In this article
  1. Formula
  2. Worked Example
  3. Why the Regression Sum of Squares Matters
  4. Relationship with Total and Residual Sum of Squares
  5. Common Mistakes and Misconceptions
  6. Limitations of the Regression Sum of Squares
  7. Frequently Asked Questions

The regression sum of squares (SSR) measures how much of the total variation in the dependent variable is explained by the regression model. You calculate it by summing the squared differences between each predicted value (ŷᵢ) and the mean of the observed values (ȳ): SSR = Σ(ŷᵢ − ȳ)². It is one of the three core sums of squares in regression analysis, alongside the total sum of squares (SST) and the error (or residual) sum of squares (SSE).

in x | X values (comma separated) | - | 1, 2, 3, 4, 5 | 0
in y | Y values (comma separated) | - | 2, 4, 5, 4, 5 | 0
out ssr | Regression Sum of Squares (SSR) | - | (slope * (sum(x*y) - sum(x)*sum(y)/count) + intercept * (sum(y) - slope*mean(x)) - mean(y))^2 * count | 4
out sst | Total Sum of Squares (SST) | - | sum((y - mean(y))^2) | 4
out sse | Error Sum of Squares (SSE) | - | sst - ssr | 4
out r2 | R-squared | - | ssr / sst | 4

Formula

In simple linear regression with one predictor variable, the regression sum of squares is:

SSR = Σ(ŷᵢ − ȳ)²

Where:

  • ŷᵢ = predicted value of the dependent variable for observation i (from the regression line ŷ = a + bx)
  • ȳ = mean of the observed dependent variable values
  • Σ = sum over all observations (i = 1 to n)

An equivalent computational formula that avoids calculating each predicted value is:

SSR = b² × Σ(xᵢ − x̄)²

where b is the slope of the regression line and x̄ is the mean of the predictor values.

Worked Example

Using the default values: X = 1, 2, 3, 4, 5 and Y = 2, 4, 5, 4, 5.

  1. Calculate means: x̄ = (1+2+3+4+5)/5 = 3, ȳ = (2+4+5+4+5)/5 = 4
  2. Compute the slope b = Σ((xᵢ − x̄)(yᵢ − ȳ)) / Σ(xᵢ − x̄)² = ((−2×−2)+(−1×0)+(0×1)+(1×0)+(2×1)) / (4+1+0+1+4) = (4+0+0+0+2)/10 = 0.6
  3. Compute the intercept a = ȳ − b·x̄ = 4 − 0.6×3 = 2.2
  4. Predicted values: ŷ = 2.2 + 0.6x → 2.8, 3.4, 4.0, 4.6, 5.2
  5. SSR = Σ(ŷᵢ − ȳ)² = (2.8−4)² + (3.4−4)² + (4.0−4)² + (4.6−4)² + (5.2−4)² = 1.44 + 0.36 + 0 + 0.36 + 1.44 = 3.6

The calculator returns SSR = 3.6, SST = 6.8, SSE = 3.2, and R² = 0.5294. Note that the formula in the calculator uses the slope/intercept computed from the data, giving the same result.

Why the Regression Sum of Squares Matters

SSR is the numerator of the coefficient of determination (R²), which tells you the proportion of variance in the outcome that the model explains. In the example above, R² = 0.5294, meaning about 53% of the variation in Y is explained by X. A higher SSR relative to SST indicates a better fit. This is fundamental in assessing how useful a linear model is for prediction or explanation.

Relationship with Total and Residual Sum of Squares

The three sums of squares are connected by the identity: SST = SSR + SSE. SST measures total variation in the observed Y values around their mean. SSE measures the leftover variation after fitting the model (the residuals). If the model fits perfectly, SSE = 0 and SSR = SST. If the model has no explanatory power (slope = 0), SSR = 0 and SSE = SST.

Common Mistakes and Misconceptions

  • Using the wrong mean: SSR uses the mean of the observed Y values, not the mean of the predicted values (though they are equal in OLS regression with an intercept).
  • Confusing SSR with SSE: SSR is explained variation; SSE is unexplained variation. Always check which one you are computing.
  • Units: SSR is in squared units of the dependent variable. If Y is in dollars, SSR is in dollars squared, which can be unintuitive. Taking the square root gives the standard deviation of the predicted values.
  • Omitting the intercept: The identity SST = SSR + SSE only holds when the regression includes an intercept term. Without an intercept, the decomposition changes.

Limitations of the Regression Sum of Squares

SSR alone does not tell you whether the model is statistically significant. You need to compare SSR to SSE using an F-test or look at the p-value. Also, SSR always increases (or stays the same) when you add more predictors, even if they are irrelevant. That is why adjusted R² and information criteria like AIC exist. Additionally, SSR is sensitive to outliers; a single extreme point can inflate or deflate the explained variation dramatically.

Frequently Asked Questions

What is the difference between SSR and SSE?

SSR (regression sum of squares) measures how much variation the model explains, while SSE (error sum of squares) measures the leftover variation that the model fails to explain. Their sum equals the total sum of squares (SST).

Can SSR be negative?

No. SSR is a sum of squared terms, so it is always zero or positive. A zero SSR means the regression line is horizontal (slope = 0) and explains nothing beyond the mean.

How do I calculate SSR in Excel?

Excel does not have a direct SSR function, but you can compute it as DEVSQ(predicted_range) where the predicted values come from the regression equation. Alternatively, use the LINEST function to get the regression statistics, which include SSR.

Is SSR the same as explained sum of squares (ESS)?

Yes, SSR is also called the explained sum of squares (ESS) or the model sum of squares. They all refer to Σ(ŷᵢ − ȳ)².

Does SSR depend on the scale of the variables?

Yes. If you change the units of X or Y (e.g., from meters to centimeters), SSR will change. However, R², which is SSR/SST, is scale-invariant and remains the same.