Skip to content
LoveToCalc

Definition — what does that mean?

Residual variance of a regression

The variance that remains around the fitted line.

In Swedish: Residualvarians i en regression

Residual variance of a regression

The relation

s²=SSresn−2

The variance left around the fitted line: the sum of squared residuals divided by n − 2, the degrees of freedom after fitting a slope and an intercept.

Solve for

s²=2

s² equals 24 divided by (14 minus 2), equals 24 divided by 12, equals 2

Working3 steps

Practice questions

You are given

  • s²=2
  • n=27

The formula

s² = SS_res / (n − 2)

Holds in simple linear regression with an intercept. SS_res = Σ(yᵢ − ŷᵢ)² is the sum of squared residuals, and n − 2 the degrees of freedom: two parameters, the slope and the intercept, were estimated from the n points. The square root, s, is the residual standard deviation.

Height and mass of 15 women (Wikipedia, simple linear regression): SS_res = 7.4906, so s² = 7.4906/13 ≈ 0.576 and s ≈ 0.759 kg.

Why n − 2

With n = 2 the line goes through both points and SS_res = 0; the formula would divide 0 by 0. With n = 3 the single remaining degree of freedom carries all the information about the spread. The divisor n − 1 belongs to a sample variance around one estimated mean; here two quantities were estimated.

SS_res n s²
24 14 2
45 12 4.5

Common mistakes

s is the number used in the t statistic for the slope; the line itself is on the least-squares line page.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
s²SSresn−22414−22
SSress²(n−2)2(14−2)24
nSSress²+2242+214

Last reviewed October 11, 2026 ·How pages are reviewed

Statistics and probabilityAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.