Tutorials › Regression Analysis (Undergraduate) › Deriving the Partial F Test for Added Model Terms

Specification Checks and Residual Patterns · Tutorial 579 of 991

Deriving the Partial F Test for Added Model Terms

See why the partial F statistic measures the reduction in residual variation per added term relative to the full model’s residual variance.

Advanced 10 min read

What You'll Learn

  • Define reduced and full regression models as nested models fitted to the same observations.
  • State the joint null hypothesis for the added coefficients.
  • Derive the partial F statistic from the difference in residual sums of squares.
  • Identify the numerator and denominator degrees of freedom.
  • Check the assumptions that make the test’s F reference distribution valid.
  • Interpret a partial F test as a joint, conditional comparison of model terms.

Why Compare Nested Regression Models?

A regression model can be expanded by adding one or more terms, such as additional predictors or functions of predictors. The expanded model will fit the observed data at least as well as the smaller model in the sense that its residual sum of squares cannot increase. The key question is whether the reduction is large relative to the residual variation that remains. The partial F test answers this question for a specified block of added terms.

“Partial” emphasizes that the block is tested after accounting for the terms already in the reduced model. It is a joint test: evidence is assessed for the added terms as a group, not one coefficient at a time. The comparison is meaningful only when the two models are nested and fitted to the same response values.

Models, Parameters, and the Null Hypothesis

Let \(y\) be the vector of \(n\) observed responses. Write the full model as \(y=X_F\beta+\varepsilon\), where \(X_F\) is its design matrix, \(\beta\) is its coefficient vector, and \(\varepsilon\) is the error vector. The reduced model is nested in the full model if every fitted mean vector allowed by the reduced model is also allowed by the full model. Equivalently, the column space of the reduced design matrix \(X_R\) is contained in the column space of \(X_F\).

Let \(p_R\) and \(p_F\) be the ranks of the reduced and full design matrices, respectively. When each model matrix has full column rank, these are also the numbers of estimated coefficients, including an intercept if present. The number of independent added terms is \(q=p_F-p_R\), which must be positive. The reduced and full models must use the same \(n\) response observations.

Definition: The partial F test compares a reduced model with a nested full model. Its null hypothesis says that all \(q\) added terms have zero coefficients, conditional on the terms already in the reduced model. If the added coefficients are denoted \(\gamma_1,\ldots,\gamma_q\), then \(H_0:\gamma_1=\cdots=\gamma_q=0\); the alternative is that at least one is nonzero. If instead the reduced-model coefficients are listed first and the added coefficients last in a single full-model parameterization, the null is \(H_0:\beta_{p_R+1}=\cdots=\beta_{p_F}=0\).

The conditional wording matters: the test asks whether the added block improves the model after the reduced-model terms are included. It does not test whether the response is associated with each added term in isolation, and it does not establish a causal effect.

Deriving the Partial F Statistic

For each model, least squares chooses coefficients to minimize the residual sum of squares. Denote the reduced- and full-model residual sums of squares by \(SSE_R\) and \(SSE_F\). Because the full model includes every fit available to the reduced model and possibly more, \(SSE_F\leq SSE_R\). The reduction in residual sum of squares is \(SSE_R-SSE_F\). Under the null, this reduction reflects error variation captured by the extra terms rather than a genuine change in the mean structure.

The partial F statistic compares the reduction per added degree of freedom with the full model’s residual mean square. If the errors are independent and normally distributed with a common variance, and the null hypothesis holds, each quantity estimates the same error variance after scaling by its degrees of freedom. Their ratio then has an \(F\) distribution.

$$ F=\frac{(SSE_R-SSE_F)/q}{SSE_F/(n-p_F)} \quad\text{with}\quad df_1=q=p_F-p_R,\qquad df_2=n-p_F. $$

The numerator is the mean square for the added block: the reduction in residual sum of squares divided by the number of independent added terms. The denominator is the full model’s residual mean square, \(SSE_F/(n-p_F)\). Large positive values of \(F\) indicate that the added block accounts for a substantial reduction relative to the remaining residual variation.

Why the Reference Distribution Is an F Distribution

The result can be justified using projection matrices. For an ordinary least-squares model, let \(P_R\) and \(P_F\) be the matrices that project a response vector onto the column spaces of \(X_R\) and \(X_F\). These are symmetric and idempotent. Since the model spaces are nested, \(P_FP_R=P_R\). The fitted values are \(P_Ry\) and \(P_Fy\), and the residual sums of squares are \(y'(I-P_R)y\) and \(y'(I-P_F)y\).

Subtracting the two residual sums of squares gives the reduction attributable to the added model space:

$$ SSE_R-SSE_F = y'(P_F-P_R)y. $$

The matrix \(P_F-P_R\) is symmetric and idempotent. Its rank is \(p_F-p_R=q\), because it projects onto the part of the full model space that is perpendicular to the reduced model space. Under \(H_0\), the true mean vector lies in the reduced model space, so \((P_F-P_R)X_R\beta_R=0\). With \(y=X_R\beta_R+\varepsilon\), the reduction therefore depends only on the errors:

$$ \frac{SSE_R-SSE_F}{\sigma^2} =\frac{\varepsilon'(P_F-P_R)\varepsilon}{\sigma^2} \sim \chi^2_q. $$

For the full-model residual sum of squares, \(I-P_F\) is also a symmetric idempotent projection, now of rank \(n-p_F\). Under the same null model,

$$ \frac{SSE_F}{\sigma^2} =\frac{\varepsilon'(I-P_F)\varepsilon}{\sigma^2} \sim \chi^2_{n-p_F}. $$

These two quadratic forms are independent: their projection matrices act on perpendicular subspaces, since \((P_F-P_R)(I-P_F)=0\). With normally distributed errors, orthogonal projections of the error vector are independent. Dividing each chi-square quantity by its degrees of freedom and taking their ratio cancels \(\sigma^2\), yielding the stated \(F_{q,n-p_F}\) distribution under \(H_0\). This derivation also shows why normality and the common error variance are needed for the exact small-sample reference distribution.

Assumptions for the Test

The partial F test is exact under the classical normal linear model assumptions for the full model, together with the nesting and same-observations requirements. State and assess these conditions before relying on an F reference distribution.

  • Correct nesting and a specified added block. The reduced-model space must be contained in the full-model space, and the tested \(q\) independent terms must be identified in advance. Both models must use the same response and observations.
  • Linear mean structure in the model coefficients. The response mean is represented by the stated design matrix and coefficients. Predictors and transformations may be nonlinear in their raw values, but their coefficients enter linearly.
  • Zero-mean errors and constant variance. Conditional on the predictors, \(E(\varepsilon)=0\) and \(\operatorname{Var}(\varepsilon)=\sigma^2 I\). In particular, errors have a common variance and are uncorrelated.
  • Normal errors for the exact F distribution. Conditional on the design, \(\varepsilon\sim N(0,\sigma^2 I)\). Without normality, the same statistic may sometimes be used as an approximation in sufficiently large samples, but its exact finite-sample F distribution is not guaranteed.
  • Estimable models and positive residual degrees of freedom. The model ranks must be well defined, \(q>0\), and \(n-p_F>0\), so the full-model residual mean square can be calculated.

Residual plots and knowledge of how the data were collected can help assess whether the mean structure, independence, and variance conditions are plausible. A numerical F statistic does not repair a violated assumption. Also, “independent errors” concerns the errors conditional on the model predictors; it is not a claim that the observed responses themselves must be independent of every predictor.

Worked Example: Testing a Two-Term Block

Hypothetical data. Suppose 30 observations are fitted with a reduced model having three coefficients and a full model that adds two independent terms, for five coefficients total. The models use the same observations and response. Their residual sums of squares are \(SSE_R=240\) and \(SSE_F=180\). Test the added block at \(\alpha=0.05\).

The block size is \(q=p_F-p_R=5-3=2\). The residual degrees of freedom for the full model are \(n-p_F=30-5=25\). The statistic is

$$ F =\frac{(240-180)/2}{180/(30-5)} =\frac{60/2}{180/25} =\frac{30}{7.2} =4.167. $$

Under \(H_0\), the reference distribution is \(F_{2,25}\). The upper-tail p-value is approximately \(0.027\). Since \(0.027<0.05\), reject \(H_0\) at the 5% significance level. In this hypothetical setting, the two added terms jointly reduce residual variation more than would typically be expected from error variation alone under the null and the model assumptions. This result does not say that both terms are individually significant.

For the assumptions, suppose the terms were specified before examining the test result, the two models are nested and fitted to the same 30 observations, and residual checks and study design support independent, constant-variance, approximately normal errors. Under these stated conditions, the exact F comparison is appropriate. If, for example, the full model used fewer observations because of missing values, this direct comparison would not be valid.

Worked Example: One Added Term and Its Degrees of Freedom

Hypothetical data. A reduced regression model has two coefficients, including its intercept, and a full model adds one predictor with one coefficient. Both models are fitted to the same 20 observations. Suppose \(SSE_R=150\) and \(SSE_F=120\). Find the test statistic and interpret it at \(\alpha=0.05\).

Here \(p_R=2\), \(p_F=3\), and \(q=3-2=1\). The degrees of freedom are \(df_1=1\) and \(df_2=20-3=17\). Thus,

$$ F =\frac{(150-120)/1}{120/(20-3)} =\frac{30}{120/17} =\frac{30}{7.059} =4.250. $$

For \(F_{1,17}\), the upper-tail p-value is approximately \(0.055\). Because \(0.055>0.05\), do not reject the null at the 5% level. The observed reduction is not quite strong enough, relative to the full-model residual variation, to meet this significance criterion. This is not proof that the predictor has no association: it is a conclusion about the evidence in these data under the model and test assumptions.

The assumptions require attention even in a one-term comparison. The predictor term must be added to the same reduced model, using the same response observations; the coefficient must be estimable; and the full-model errors must reasonably satisfy the stated conditions. If the added predictor is exactly redundant with existing predictors, the model rank does not increase and it does not contribute one independent degree of freedom.

Worked Example: Interpreting a Significant One-Term Comparison

Hypothetical data. Suppose 12 observations are used in a reduced model with an intercept and one predictor, and a full model adds one further coefficient. The models use the same observations, with \(SSE_R=90\) and \(SSE_F=45\). Test the added coefficient at \(\alpha=0.05\).

The models have \(p_R=2\), \(p_F=3\), and \(q=1\), so the degrees of freedom are \(1\) and \(12-3=9\). The statistic is

$$ F =\frac{(90-45)/1}{45/(12-3)} =\frac{45}{5} =9.000. $$

The p-value from \(F_{1,9}\) is approximately \(0.015\). Since \(0.015<0.05\), reject the null that the added coefficient is zero conditional on the reduced-model term. In this hypothetical example, the added term provides evidence of an improved mean fit under the assumed model. The conclusion is conditional and associational; it does not establish that changing the predictor would cause the response to change.

This calculation is valid provided both models are nested, their coefficient counts correspond to their ranks, and the same 12 responses are included. It also relies on independent, normal errors with common variance and a correctly specified mean structure. The small sample makes it especially important not to treat the exact p-value as robust to substantial departures from those assumptions.

Common Mistakes and Practical Meaning

  • Using the wrong degrees of freedom. The numerator degrees of freedom are the rank increase \(p_F-p_R\), not the total number of full-model coefficients. The denominator degrees of freedom are \(n-p_F\).
  • Comparing models fitted to different observations. Different samples can change the residual sums of squares for reasons unrelated to the added terms. The standard partial F formula requires the same response observations in both fits.
  • Testing coefficients one at a time instead of as a block. A partial F test assesses the joint null for all added coefficients. It does not imply that each term is individually important or unimportant.
  • Treating any decrease in SSE as evidence. A nested full model cannot have a larger least-squares SSE, but some decrease is expected just from adding terms. The test measures that decrease relative to the estimated error variance and the number of added degrees of freedom.
  • Reading a p-value as the probability that the null is true. The p-value is the probability, assuming the null and test assumptions, of obtaining an F statistic at least as large as the observed one. It is not the probability that the null is true.

The partial F test is useful when the scientific or modeling question concerns a block of terms rather than one coefficient. Its value is not a mechanical instruction to enlarge a model whenever the p-value is small. The terms should make sense for the modeling question, and conclusions should be considered alongside residual evidence and the limitations of the assumed regression model.

Key takeaway: For nested models fitted to the same observations, the partial F statistic is the reduction in residual sum of squares per added degree of freedom divided by the full model’s residual mean square. Under the null and classical normal linear model assumptions, it has an \(F_{p_F-p_R,\;n-p_F}\) distribution.

Check Your Understanding

Use the definitions, formula, and assumptions above to answer the following questions.

  1. A reduced model has rank 4 and a full model has rank 7. How many numerator degrees of freedom does their partial F test have, and what joint null hypothesis is being tested?
  2. Why must the reduced and full models use the same response observations for the standard partial F comparison?
  3. If \(n=40\) and \(p_F=6\), what are the denominator degrees of freedom?
  4. Explain why a decrease in SSE is not, by itself, evidence that the added terms improve the model beyond what is expected by chance.
  5. State the conditional interpretation of a significant test of a block of added terms. What does it not establish?