COLLEGE STATISTICS • REGRESSION AND CORRELATION

Residual Analysis & Influence — Residual Analysis and Outlier/Influence Concepts

Understanding how individual observations shape regression models through residual diagnostics and influence measures.

Historical Context & Motivation

The method of least squares was independently developed by Adrien-Marie Legendre and Carl Friedrich Gauss in the early nineteenth century, giving researchers a principled way to fit a line through scattered data. Yet for more than a century, practitioners largely trusted the global fit without examining whether individual observations might be distorting the results. As datasets grew in complexity through the twentieth century, statisticians realized that a single aberrant point could drastically alter slope estimates, confidence intervals, and hypothesis tests. This recognition catalyzed the development of formal diagnostic tools designed to detect problematic observations and assess their impact on regression output.

1805
Legendre Publishes Least Squares
Adrien-Marie Legendre formally introduces the method of least squares, establishing the criterion of minimizing the sum of squared deviations — the foundation from which residual analysis would eventually emerge.
1977
Cook's Distance
R. Dennis Cook proposes a single summary statistic — Cook's distance — that measures how much all fitted values change when an observation is deleted, unifying the concepts of outlyingness and leverage into one influence measure.
1980
Belsley, Kuh & Welsch Diagnostics
The landmark text 'Regression Diagnostics' by Belsley, Kuh, and Welsch systematically presents DFBETAS, DFFITS, and condition indices, establishing the modern toolkit for detecting influential observations in multiple regression.
1986
Studentized Residuals Standardized
Building on earlier work by R. L. Allen and others, externally studentized (deleted) residuals become a standard diagnostic, enabling analysts to detect outliers using t-distribution cutoffs even in the presence of masking effects.
2000s
Automated Diagnostics in Software
Statistical software packages such as R, SAS, and Stata integrate residual plots and influence diagnostics into standard regression output, making these tools accessible in routine data analysis across the sciences and social sciences.

The central question driving this topic is deceptively simple: can we trust our regression line? A well-fitting model might conceal the fact that one or two observations are pulling the line toward themselves, masking the true pattern in the remaining data. Residual analysis provides the lens through which we inspect each observation's contribution to the model, while influence diagnostics quantify the degree to which removing a single point would alter the conclusions. Together, these tools form an indispensable part of responsible regression modeling.

Core Principles & Definitions

Before examining computational formulas, it is essential to distinguish the key concepts that underpin residual analysis. A residual is defined as the difference between an observed response value and the value predicted by the fitted regression model. When we examine the collection of all residuals — their distribution, spread, and patterns — we gain critical information about whether our modeling assumptions (linearity, constant variance, normality, independence) are satisfied. Beyond assumption checking, specific observations may warrant special scrutiny because they are unusual in predictable ways.

1

Residual

The vertical distance between an observed data point yᵢ and its fitted value ŷᵢ, computed as eᵢ = yᵢ − ŷᵢ. Residuals serve as the primary raw material for all post-fit diagnostics.
2

Outlier

An observation whose response value is far from the fitted regression surface — that is, an observation with a large residual (or studentized residual). Outliers suggest the model poorly predicts certain cases.
3

Leverage Point

An observation with an extreme or unusual combination of predictor values (high leverage, hᵢᵢ). Such points have disproportionate potential to influence the fitted regression coefficients, regardless of their response values.
4

Influential Observation

A point that, when removed, causes a substantial change in the estimated regression coefficients, predictions, or summary statistics. Influence combines outlyingness and leverage: a point must have both to be truly influential.
5

Standardized vs. Studentized Residual

Standardized residuals divide eᵢ by the estimated standard deviation of residuals. Studentized (deleted) residuals go further by re-estimating the model without observation i, yielding a t-distributed quantity ideal for formal outlier testing.
KEY TAKEAWAY
Think of residual analysis like quality control on a manufacturing line. The regression model is your machine, and each residual is a measurement of how far each product deviates from spec. An outlier is a defective product; a leverage point is a product made from an unusual batch of raw materials; and an influential observation is one that, if it jams the machine, warps the calibration for everything else coming off the line. Identifying these cases is essential before trusting the output.

Visual Explanation — Residuals on a Scatterplot

The most intuitive way to understand residuals is to see them. The diagram below displays a simple linear regression scenario with several data points, the fitted regression line, and vertical line segments representing each residual. Notice how points above the line have positive residuals and points below the line have negative residuals. The diagram also highlights three special cases: a high-leverage point at an extreme x-value, an outlier with a large residual, and an influential observation that exhibits both properties simultaneously.

The dashed violet line represents the fitted regression line ŷ = b₀ + b₁x. Vertical dashed segments show residuals. The pink outlier has a large residual but moderate x-value. The cyan leverage point sits at an extreme x-value but near the line. The amber influential observation combines extreme x with a large residual, pulling the fitted line toward itself.

Observe that high leverage alone does not necessarily distort the regression line — the cyan point sits close to where the line already passes. Similarly, the pink outlier has a large residual but is located near the center of the x-distribution, giving it limited mechanical advantage to tilt the line. The amber point, however, sits far from the x-mean and far from the line, creating a "lever arm" effect that can substantially shift the estimated slope and intercept. This is why influence is the product of outlyingness and leverage — both ingredients are necessary to meaningfully alter the regression fit.

Mathematical Framework

The mathematical underpinnings of residual analysis rest on the hat matrix H, which projects the observed response vector y onto the column space of the design matrix X. In the ordinary least squares framework, the vector of fitted values is ŷ = Hy = X(XTX)−1XTy. The diagonal elements hᵢᵢ of H — called leverage values — measure how far observation i's predictor values are from the centroid of the predictor space, thereby quantifying its potential to influence the fit.

ORDINARY RESIDUAL
eᵢ = yᵢ − ŷᵢ
where yᵢ is the observed response and ŷᵢ is the predicted value from the fitted model. The residual eᵢ has variance σ²(1 − hᵢᵢ), so points with high leverage have smaller residual variance — they are pulled closer to the line by construction.
INTERNALLY STUDENTIZED RESIDUAL
rᵢ = eᵢ / (s√(1 − hᵢᵢ))
where s is the root mean square error (RMSE) estimated from all n observations and hᵢᵢ is the leverage of observation i. This rescaling accounts for the fact that residuals of high-leverage points are expected to be smaller, making comparisons across observations more meaningful.
EXTERNALLY STUDENTIZED (DELETED) RESIDUAL
tᵢ = eᵢ / (s₍₋ᵢ₎√(1 − hᵢᵢ))
Here s₍₋ᵢ₎ denotes the RMSE computed from the model fitted without observation i. Under the null hypothesis that observation i belongs to the model, tᵢ follows a t-distribution with n − p − 2 degrees of freedom. Values of |tᵢ| exceeding roughly 2–3 warrant investigation as potential outliers.
COOK'S DISTANCE
Dᵢ = (rᵢ²/p) × (hᵢᵢ/(1 − hᵢᵢ))
Cook's distance combines the squared standardized residual (measuring outlyingness in y) with the leverage ratio hᵢᵢ/(1 − hᵢᵢ) (measuring extremity in x). A common guideline flags Dᵢ > 4/n or Dᵢ > 1 as indicative of an influential observation, where p is the number of estimated parameters including the intercept.
💡 Why Delete-One?
The "leave-one-out" philosophy pervading influence diagnostics is straightforward: if removing a single observation causes large changes to the regression coefficients or predictions, that observation exerts undue control over the analysis. The externally studentized residual, Cook's distance, DFFITS, and DFBETAS all formalize this notion by comparing the full-data fit to the fit with observation i deleted.

Diagnostic Measures & Classification

Beyond Cook's distance, several complementary diagnostics exist. DFFITS measures the change in the fitted value for observation i when it is deleted, expressed in units of the standard error of ŷᵢ. DFBETAS provides a separate measure for each regression coefficient, quantifying how much bⱼ changes (in units of its standard error) when observation i is removed. Leverage values (hᵢᵢ) from the hat matrix provide a purely predictor-space measure of unusualness. The table below summarizes these diagnostics, their formulas, and commonly used thresholds.

Summary of key regression diagnostics and their thresholds
DiagnosticWhat It MeasuresFormula / Key IdeaCommon Threshold
Leverage (hᵢᵢ)Extremity of predictor valuesDiagonal of H = X(XᵀX)⁻¹Xᵀhᵢᵢ > 2p/n
Studentized Residual (tᵢ)Outlyingness of responseeᵢ / (s₍₋ᵢ₎√(1 − hᵢᵢ))|tᵢ| > 2 or Bonferroni-adjusted
Cook's Distance (Dᵢ)Overall influence on all fitted values(rᵢ²/p) × hᵢᵢ/(1 − hᵢᵢ)Dᵢ > 4/n or Dᵢ > 1
DFFITSChange in ŷᵢ when obs i removedtᵢ × √(hᵢᵢ/(1 − hᵢᵢ))|DFFITS| > 2√(p/n)
DFBETAS(j)Change in coefficient bⱼ when obs i removed(bⱼ − bⱼ₍₋ᵢ₎)/SE(bⱼ₍₋ᵢ₎)|DFBETAS| > 2/√n
A two-dimensional classification of observations. The horizontal axis represents leverage (predictor-space extremity) and the vertical axis represents the magnitude of the studentized residual (response-space outlyingness). Points in the lower-right quadrant are the most consequential: they combine both high leverage and large residuals, making them truly influential.

This four-quadrant framework is the conceptual backbone of influence analysis. In practice, you will use numerical diagnostics (Cook's distance, DFFITS) rather than visual quadrant placement, but the intuition remains: an observation must be unusual in both predictor space and response space to exert meaningful influence on the regression coefficients. A point that is only a leverage point or only an outlier may merit attention for other reasons (model misspecification, data recording errors) but typically does not distort the overall fit as severely.

Worked Example — Computing Diagnostics

Suppose we fit the simple linear regression ŷ = 2.5 + 1.8x to n = 20 observations with p = 2 parameters (intercept + slope). We obtain RMSE s = 3.2 from the full model. Consider observation i = 14, which has x₁₄ = 15 (the sample mean of x is 8) and y₁₄ = 38. The model predicts ŷ₁₄ = 2.5 + 1.8(15) = 29.5. Additional information: the leverage value h₁₄,₁₄ = 0.31, and the RMSE computed without observation 14 is s₍₋₁₄₎ = 2.9. We will compute the key diagnostics.

Diagnosing Observation 14
1
Step 1 — Compute the ResidualThe ordinary residual is e₁₄ = y₁₄ − ŷ₁₄ = 38 − 29.5 = 8.5. This positive value tells us the observed response is considerably higher than the model predicts.
e₁₄ = 8.5
2
Step 2 — Compute the Internally Studentized ResidualUsing the full-data RMSE: r₁₄ = e₁₄ / (s × √(1 − h₁₄,₁₄)) = 8.5 / (3.2 × √(1 − 0.31)) = 8.5 / (3.2 × √0.69) = 8.5 / (3.2 × 0.8307) = 8.5 / 2.658 ≈ 3.20. This is well above 2, indicating potential outlyingness.
r₁₄ ≈ 3.20
3
Step 3 — Compute the Externally Studentized (Deleted) ResidualUsing the leave-one-out RMSE: t₁₄ = e₁₄ / (s₍₋₁₄₎ × √(1 − h₁₄,₁₄)) = 8.5 / (2.9 × 0.8307) = 8.5 / 2.409 ≈ 3.53. Under the null hypothesis, this follows a t-distribution with n − p − 2 = 20 − 2 − 2 = 16 degrees of freedom. The two-tailed p-value for |t| = 3.53 with 16 df is approximately 0.003, confirming this is a statistically significant outlier.
t₁₄ ≈ 3.53 (p ≈ 0.003)
4
Step 4 — Assess LeverageThe leverage threshold is 2p/n = 2(2)/20 = 0.20. Since h₁₄,₁₄ = 0.31 > 0.20, observation 14 is a high-leverage point. This makes sense because x₁₄ = 15 is far from the mean of 8.
h₁₄,₁₄ = 0.31 > 0.20 → High leverage
5
Step 5 — Compute Cook's DistanceDᵢ = (rᵢ² / p) × (hᵢᵢ / (1 − hᵢᵢ)) = (3.20² / 2) × (0.31 / 0.69) = (10.24 / 2) × 0.4493 = 5.12 × 0.4493 ≈ 2.30. Compared to the 4/n = 4/20 = 0.20 threshold, D₁₄ = 2.30 far exceeds it, and it also exceeds the more conservative threshold of 1.0. Observation 14 is unambiguously influential.
D₁₄ ≈ 2.30 ≫ 0.20 → Highly influential
6
Step 6 — Interpretation and ActionObservation 14 is both a statistical outlier (|t₁₄| = 3.53) and a high-leverage point (h₁₄,₁₄ = 0.31), yielding a very large Cook's distance. The analyst should investigate whether this observation reflects a data entry error, a genuinely different population, or unusual but valid data. If it is a legitimate observation, the analyst might report regression results both with and without observation 14 to demonstrate the sensitivity of the conclusions.

Strengths & Limitations of Diagnostic Measures

No single diagnostic captures every facet of data quality. Each tool has particular strengths and blind spots, so experienced practitioners typically examine several diagnostics in concert rather than relying on any one measure. The table below compares the most widely used diagnostics across several evaluative dimensions.

Comparative strengths and limitations of regression diagnostics
DiagnosticStrengthsLimitations
Ordinary ResidualsSimple to compute and interpret; directly show model misfit at each point; useful in residual-vs-fitted and residual-vs-predictor plots for detecting non-linearity and heteroscedasticity.Unequal variances across observations — high-leverage points have artificially small residuals, masking potential problems. Not directly comparable across observations without standardization.
Studentized ResidualsAccount for heterogeneous residual variances; externally studentized version follows a t-distribution under the null, enabling formal hypothesis testing for outliers.Multiple testing issues when examining all n residuals simultaneously — Bonferroni or similar corrections are needed. May suffer from masking when multiple outliers cluster together.
Leverage (hᵢᵢ)Depends only on predictor values, so it can be computed before observing responses; directly interpretable as the weight observation i exerts on its own fitted value.Does not account for the response — a high-leverage point near the regression surface is benign. Must be paired with a residual measure to assess actual influence.
Cook's DistanceCombines leverage and outlyingness into a single summary; intuitive interpretation as the distance between full-data and deleted-data fitted-value vectors; widely implemented in software.Threshold rules (Dᵢ > 4/n, Dᵢ > 1) are guidelines, not formal tests. Can be dominated by a single extreme observation, causing less extreme but still problematic points to appear benign.
DFBETAS / DFFITSDFBETAS provides coefficient-specific sensitivity; DFFITS provides prediction-specific sensitivity. Together they give a granular view of where influence is concentrated.Produce a large volume of output in models with many predictors, making manual inspection tedious. Thresholds depend on sample size and may be overly liberal or conservative.
KEY TAKEAWAY
Using a single diagnostic is like checking only one vital sign during a medical exam — a normal temperature doesn't rule out high blood pressure. In practice, always examine a battery of diagnostics: residual plots for assumption checking, leverage values for predictor-space extremity, studentized residuals for response-space outlyingness, and Cook's distance or DFFITS for overall influence. When multiple diagnostics flag the same observation, you have convergent evidence that it deserves careful investigation.

Connection to Advanced Theory

The diagnostic framework presented here extends naturally into more advanced settings. In multiple regression with many predictors, leverage reflects the Mahalanobis distance of an observation's predictor vector from the centroid of the predictor space, accounting for correlations among predictors. In generalized linear models (GLMs), residuals are replaced by deviance residuals or Pearson residuals, and the hat matrix is replaced by the generalized hat matrix derived from the iteratively reweighted least squares algorithm. Robust regression methods, such as M-estimation and least trimmed squares, are designed to automatically downweight or exclude influential observations, providing an alternative to the detect-then-decide approach of classical diagnostics.

Classical diagnostics and their advanced counterparts
ConceptClassical OLS SettingAdvanced / Extended Setting
Residual TypeOrdinary, standardized, or studentized residual (eᵢ, rᵢ, tᵢ)Deviance residuals, Pearson residuals, Anscombe residuals in GLMs; martingale residuals in survival models
LeverageDiagonal of H = X(XᵀX)⁻¹XᵀGeneralized leverage from IRLS; Mahalanobis distance for multivariate predictors; partial leverage in variable-added plots
Influence MeasureCook's D, DFFITS, DFBETAS with exact deletion formulasOne-step approximations in large-sample GLMs; case-deletion diagnostics for mixed models; influence functions in semiparametric models
Remedial ActionInvestigate, report with/without point, transformRobust regression (M-estimation, LTS, MM-estimators); Bayesian hierarchical models with heavy-tailed priors; penalized regression

Understanding the classical residual and influence framework thoroughly prepares you for these extensions. The underlying logic — quantify how much an individual observation affects the model fit, then decide whether that effect is substantively important — remains unchanged regardless of the model class. In courses on generalized linear models, survival analysis, or Bayesian statistics, you will encounter analogous diagnostics built on the same conceptual foundation, making this material a gateway to advanced model-checking methodology.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain the difference between an outlier, a leverage point, and an influential observation in the context of simple linear regression. Can an observation be a leverage point without being influential? Can it be an outlier without being influential? Justify your answers.
PROBLEM 2BASIC CALCULATION
A simple linear regression model with p = 2 parameters is fit to n = 25 observations. Observation 7 has a leverage value h₇₇ = 0.22, an ordinary residual e₇ = −5.4, and the RMSE from the full model is s = 2.8. Compute the internally studentized residual r₇ and determine whether the leverage exceeds the common threshold.
PROBLEM 3INTERMEDIATE
Continuing from Problem 2, suppose the RMSE computed without observation 7 is s₍₋₇₎ = 2.5. Compute the externally studentized residual t₇ and Cook's distance D₇. Does D₇ exceed the 4/n threshold? Does it exceed the more conservative threshold of 1?
PROBLEM 4APPLIED
A researcher fits a multiple regression model predicting house sale price from square footage and number of bedrooms (p = 3 parameters) using n = 50 homes. One observation is a 12,000-square-foot mansion that sold for $450,000 — far below the predicted price of $1,200,000 based on the model. This observation has h = 0.38, an externally studentized residual t = −4.1, and Cook's distance D = 3.85. The researcher asks: should this observation be deleted from the analysis? Write a brief consulting response addressing the statistical findings and recommending a course of action.
PROBLEM 5CRITICAL THINKING
A dataset of n = 15 observations contains two potential outliers that appear to be pulling the regression line in the same direction. When you delete observation A alone, Cook's distance for observation B increases substantially, and vice versa. Explain the phenomenon of masking in the context of influence diagnostics, and propose a strategy that might reveal the joint effect of these two observations when standard single-deletion diagnostics fail.

Summary — Residual Analysis and Influence Concepts

Residual analysis is the practice of examining the differences eᵢ = yᵢ − ŷᵢ between observed and predicted values to assess model adequacy and identify problematic observations. Outliers are observations with large studentized residuals, indicating poor model fit for that case. Leverage points have extreme predictor values (high hᵢᵢ), giving them disproportionate potential to shift the fitted line. An observation becomes influential when it combines both outlyingness and leverage — a condition quantified by Cook's distance, DFFITS, and DFBETAS.

Responsible regression practice demands examining multiple diagnostics together — residual plots for assumption checking, leverage values for predictor-space extremity, and influence measures for coefficient sensitivity. When a flagged observation is identified, the analyst should investigate its source (data error, different population, or legitimate extreme case) rather than reflexively deleting it. Reporting results with and without the observation provides transparency and demonstrates the robustness — or fragility — of the conclusions. This framework extends naturally to generalized linear models and robust regression, making it a foundational skill for any data analyst.

Varsity Tutors • College Statistics • Residual Analysis & Influence — Residual Analysis and Outlier/Influence Concepts