ANOVA · Foundational

ANOVA Tables Partition Variation in Regression

How sums of squares, degrees of freedom, mean squares, and the F statistic summarize a fitted model.

An analysis of variance table—an ANOVA table—organizes a regression into variation explained by the model and variation left in the residuals. It turns one fitted equation into an accounting system for variability.

Partitioning the sums of squares

For observations yiy_i, fitted values y^i\hat y_i, and mean yˉ\bar y,

SST=i(yiyˉ)2\mathrm{SST}=\sum_i(y_i-\bar y)^2

is total variation,

SSR=i(y^iyˉ)2\mathrm{SSR}=\sum_i(\hat y_i-\bar y)^2

is variation explained by the regression, and

SSE=i(yiy^i)2\mathrm{SSE}=\sum_i(y_i-\hat y_i)^2

is residual variation. For ordinary least squares with an intercept,

SST=SSR+SSE.\mathrm{SST}=\mathrm{SSR}+\mathrm{SSE}.

Degrees of freedom and mean squares

If a model contains pp estimated coefficients including the intercept, the common regression table uses:

SourceDegrees of freedomSum of squaresMean square
Regressionp1p-1SSRMSR=SSR/(p1)\mathrm{MSR}=\mathrm{SSR}/(p-1)
Errornpn-pSSEMSE=SSE/(np)\mathrm{MSE}=\mathrm{SSE}/(n-p)
Totaln1n-1SST

The residual mean square estimates the error variance when the model assumptions are appropriate.

Interpreting the F test

The classical null hypothesis says that all non-intercept regression coefficients are zero. A large FF is evidence that the model explains more variation than expected from noise alone, under the stated assumptions.

Sequential and partial tests

In models with several terms, sums of squares can depend on the order in which terms enter. Partial F tests compare nested models and ask whether added terms reduce error enough to justify their degrees of freedom.

Build a table from numbers

Suppose n=20n=20, the model has an intercept and two predictors (p=3p=3), SST is 200200, and SSE is 8080. Then SSR is 120120. The degrees of freedom are 22, 1717, and 1919.

MSR=120/2=60,MSE=80/174.706,\mathrm{MSR}=120/2=60,\qquad \mathrm{MSE}=80/17\approx4.706,

so F12.75F\approx12.75. The reference distribution is F2,17F_{2,17} under the null and standard regression assumptions.

Partial F tests

For nested reduced and full models,

F=(SSERSSEF)/(pFpR)SSEF/(npF).F=\frac{(\mathrm{SSE}_R-\mathrm{SSE}_F)/(p_F-p_R)}{\mathrm{SSE}_F/(n-p_F)}.

This asks whether a block of added terms reduces error enough to justify its parameter cost.

Check your understanding

If SSR rises after adding predictors, must the partial F test be significant?

Show the reasoning

No. SSR always rises or stays fixed in nested ordinary least squares. Significance depends on the size of the improvement relative to the added degrees of freedom and residual variation.

Continue exploring

Connections

Related concepts

Curve FittingCurve Fitting: From Data to ModelLeast SquaresLeast Squares Finds the Closest ModelFit DiagnosticsGoodness of Fit Requires More Than R²

Applications

  • model comparison
  • regression significance
  • experimental analysis