AI Glossary / Probabilistic machine learning / Intermediate

Partial regression

Definition

Partial regression examines the linear relationship between an outcome and a predictor after removing the linear contributions of other specified predictors. In ordinary least squares, regressing the adjusted outcome on the adjusted predictor reproduces that predictor's coefficient in the full multiple regression, provided the same observations and control variables are used.

What it means

Two variables can move together partly because both are related to another variable. Partial regression separates the variation left after the chosen linear adjustment. It makes the meaning of a multiple-regression coefficient easier to inspect.
The adjustment is statistical. It does not automatically remove every confounder, establish causality, or correct a poorly specified model. The result is conditional on the selected controls, functional form, and observations. Changing any of those choices can change the coefficient and its interpretation.

How it works

Choose the predictor of interest x, the outcome y, and a matrix Z of other predictors, including an intercept if the full model includes one. Regress x on Z and retain residuals r_x. Separately regress y on Z and retain residuals r_y.
Regress r_y on r_x. For a single identifiable predictor, the slope is (r_x-transpose r_y) divided by (r_x-transpose r_x). The Frisch - Waugh - Lovell theorem states that this equals x's coefficient in the full least-squares regression of y on x and Z.
A partial regression plot displays those two residuals and can reveal influential observations or departures from the assumed linear relationship. Inference requires the full model's appropriate degrees of freedom and covariance treatment; ordinary software output from an isolated residual regression may need adjustment.

Three practical examples

  • Descriptive business analysis: inspect how a measured outcome relates to one predictor after adjusting for specified background variables, without automatically interpreting the relationship causally.
  • Regression diagnostics: use a partial regression plot to find observations that strongly influence a particular coefficient.
  • Teaching and verification: compare the coefficient from a full linear model with the slope from residualized variables to check understanding of multiple regression.

Think of it this way

Think of comparing two audio tracks after subtracting a shared background pattern from each. The remaining tracks reveal a relationship that was partly obscured by the background. The analogy is limited: regression removes only the patterns represented by the chosen controls, and the remainder can still contain unmeasured influences or model errors.

Worked example

Consider an original four-observation example. Let the control z be (−1, −1, 1, 1), the predictor x be (−2, 0, 0, 2), and the outcome y be (−6, −4, 2, 8). All three have mean zero; include an intercept in the models.
Regressing x on z gives slope 1 and fitted values (−1, −1, 1, 1). The residual predictor is r_x = (−1, 1, −1, 1).
Regressing y on z gives slope 5 and fitted values (−5, −5, 5, 5). The residual outcome is r_y = (−1, 1, −3, 3).
Their cross-product is 1 + 1 + 3 + 3 = 8, and r_x's squared sum is 4. The partial regression slope is therefore 8/4 = 2, matching x's coefficient in the full regression y = intercept + beta_x x + beta_z z + error.
Without adjustment, the slope is (x-transpose y)/(x-transpose x) = 28/8 = 3.5. The change from 3.5 to 2 reflects the specified linear adjustment, not proof that 2 is a causal effect. The small constructed dataset is for arithmetic verification, not statistical evidence.

Illustrative case study

Fictional case: Willow Services examines whether a workload measure is associated with completion time after adjusting for task type and staffing. A partial regression plot reveals that a few unusual cases strongly influence the workload coefficient.
The analysts check those records and compare reasonable specifications. They explain that staffing may itself respond to workload, so choosing it as a control is a substantive decision rather than an automatic improvement. The final report presents an adjusted association and its limitations. This case illustrates interpretation and diagnostics, not a demonstrated operational effect.

Common misconceptions and mistakes

Partial regression is not partial least squares regression. PLS constructs response-informed components, while partial regression here describes residualization in ordinary least squares.
Do not confuse the partial slope with partial correlation. They are related through residual standard deviations but are not generally the same number.
The standard theorem concerns a specified linear least-squares problem. Replacing the residualization steps with arbitrary nonlinear or regularized models does not automatically preserve exact coefficient equality.
Finally, use the same observations in every step. Different missing-data subsets can break the intended comparison. If x is perfectly explained by the controls, its residual is zero and its separate coefficient is not identifiable.

Business use

Partial regression can help teams understand an adjusted relationship and identify which observations support it. It is particularly useful when a multiple-regression table hides the remaining variation in the predictor of interest.
Document the controls, sample definition, and reasons for including variables. Inspect how much predictor variation remains after adjustment, since little remaining variation can make estimates unstable. For causal questions, justify the adjustment set separately; the algebra of partial regression cannot determine which variables should be controlled for.

People also ask

Does partial regression always weaken a relationship?

No. Adjustment can weaken, strengthen, or reverse the estimated association.

Must both variables be residualized for a partial regression plot?

The standard plot uses residuals of both y and x after the same control adjustment.

Does controlling for more variables always improve the answer?

No. It changes the question and can create instability or inappropriate adjustment, depending on the purpose and data-generating relationships.

Check your understanding

After regressing x on the controls, every residual is zero. Can the partial-regression formula identify a separate slope for x?

Answer: No. Its denominator is zero because x contains no variation beyond those controls. The full model has a corresponding collinearity problem for that coefficient.

Related terms

  • Frisch - Waugh - Lovell theorem
  • Multiple regression
  • Partial correlation
  • Collinearity
  • Ordinary Least Squares
  • residualization
  • added-variable plot
  • control variable

Learn next

Review least-squares projection and residual orthogonality. Then compute the full-model coefficient and residual-regression slope on the same small dataset. Compare partial correlation, partial regression, and PLS, and study why statistical adjustment alone does not settle a causal interpretation.

  • Least squares
  • Partial correlation

More in Probabilistic machine learning

  • Outlier exposure - Outlier exposure is a training approach that uses an auxiliary dataset of out-of-distribution examples to improve a model's ability to recognize unfamiliar...
  • Parallel tempering - Parallel tempering is a Monte Carlo sampling method that runs several related chains at different temperatures and occasionally proposes exchanges of their...
  • Partial least squares regression - Partial least squares regression, or PLS regression, predicts one or more responses using a smaller set of components constructed from the predictors with...
  • Particle path degeneracy - Particle path degeneracy is the loss of diversity in the earlier parts of trajectories represented by a particle filter.
  • Periodic kernel - A periodic kernel is a covariance function that represents repeating relationships in a Gaussian process or another suitable kernel model.
  • Persistent contrastive divergence - Persistent contrastive divergence, or PCD, is a learning method for energy-based models that maintains sampling chains across parameter updates.

Sources

Ding, The Frisch–Waugh–Lovell Theorem for Standard Errors, original research: https://arxiv.org/pdf/2009.06621 Ding Section 2.1 Theorems 1 and 2 and Section 2.2 covariance caveats were independently consulted.

Previous: Partial program Next: Partial solution

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer