Ridge Regression and the Influence of a Single Point
Lagrange multipliers, Cook’s distance, and Sherman–Morrison
Contents
- 1 Linear Regression
- 1.1 Probabilistic Formulation
- 2 Regularization and Influence Diagnostics
- 3 Ridge Regression
- 3.1 Constrained Formulation
- 3.2 A Geometric View of Lagrange Multipliers
- 3.3 Unconstrained Formulation
- 3.4 Relation Between the Constrained and Penalized Forms
- 4 Cook’s Distance
- 4.1 Matrix Determinant Lemma
- 4.2 Sherman–Morrison Formula
- 4.3 Derivation of the Influence Formula
- 5 Autoregression
These notes are adapted from Prof. Alexis Drouot’s MATH 480 course at the University of Washington, Seattle (Winter 2025). They focus on several topics around linear regression: its probabilistic formulation, Ridge regularization, influence diagnostics through Cook’s distance, and the representation of autoregressive models as linear regressions. I have done my best to ensure correctness, but errors may remain.
1Linear Regression
1.1Probabilistic Formulation
Consider a dataset of observations
where are the predictors and is the response.
In the probabilistic formulation of linear regression, we assume
where is the parameter vector and
Hence
Assuming the observations are independent,
Taking logarithms,
Therefore, for fixed , maximizing the likelihood with respect to is equivalent to minimizing
In matrix notation,
where is the design matrix and is the response vector.
The gradient and Hessian are
If has linearly independent columns, then is positive definite, so is strictly convex and the OLS minimizer is unique:
If the Gaussian i.i.d. noise assumption is changed, the corresponding likelihood—and hence the natural loss function—may also change.
2Regularization and Influence Diagnostics
OLS can be sensitive to influential observations because squared residuals place substantial weight on large errors. Ridge regression does not make least squares robust in the usual statistical sense; instead, it stabilizes coefficient estimates by shrinking their magnitude and is especially useful in settings involving multicollinearity, ill-conditioning, or high variance.
Influential observations can be studied separately using diagnostics such as Cook’s distance. Such diagnostics are best interpreted as tools for identifying observations that deserve further investigation, rather than as automatic rules for deleting data.
We first study Ridge regression and then return to influence diagnostics.
3Ridge Regression
3.1Constrained Formulation
A constrained form of Ridge regression is
where .
The feasible set
is compact, and the objective is continuous, so a minimizer exists.
If satisfies
then the constraint is inactive and the constrained solution is simply .
Otherwise, the optimum must lie on the boundary:
Because the problem is convex, the Karush–Kuhn–Tucker conditions characterize the optimum. Introduce
with .
The KKT conditions are
and
The stationarity condition gives
so
If , then is positive definite because, for any nonzero ,
Hence it is invertible, even if does not have linearly independent columns.
Therefore,
The complementary-slackness condition separates the two cases:
- If , the constraint is inactive and , assuming the OLS solution is uniquely defined.
- If , then the constraint is active: .
3.2A Geometric View of Lagrange Multipliers
For completeness, consider the equality-constrained problem
Let
and suppose is a local extremum with .
The tangent space at can be described by
where is .
For any such curve,
Since is a local extremum of restricted to ,
By the regular-level-set theorem,
Thus
so there exists such that
This is the usual Lagrange-multiplier condition. It is a necessary condition for regular constrained local extrema, not in general a sufficient condition for global optimality.
3.3Unconstrained Formulation
The more common form of Ridge regression is
where .
Define
Then
For any nonzero ,
Thus is strictly convex for every , regardless of whether has full column rank. Consequently, it has a unique minimizer satisfying
namely
3.4Relation Between the Constrained and Penalized Forms
The constrained and penalized formulations describe the same family of nonzero Ridge solutions, with some care at the endpoints.
Suppose , and let solve
By the KKT conditions, there exists such that
Therefore, also minimizes
Conversely, for any , let
and set . Then solves the constrained problem with radius .
There are two endpoint subtleties:
- If the constraint is sufficiently loose, then and the constrained solution is OLS.
- If , the constrained solution is . In general this is not obtained for any finite , but as .
4Cook’s Distance
Cook’s distance is an influence diagnostic that measures how much the fitted regression model changes when a single observation is removed.
Assume has full column rank. Let
be the OLS estimator using all observations.
For observation , let and denote the dataset with the -th observation removed, and define the leave-one-out estimator
assuming also has full column rank.
To compare the two fitted models on the same design points, define the unscaled influence measure
Let
be the hat matrix. We will show that
4.1Matrix Determinant Lemma
Lemma 1. Suppose is an invertible matrix and . Then
Proof. First consider . We have
The first and third matrices have determinant , so
For general ,
and therefore
4.2Sherman–Morrison Formula
Lemma 2. Let be invertible and suppose . Then
Proof. By the matrix determinant lemma, is invertible. Define
A direct multiplication shows
Hence .
4.3Derivation of the Influence Formula
Since removing the -th observation gives
the Sherman–Morrison formula yields
provided
Also,
Let
A calculation gives
Therefore
so
This is an unscaled version of Cook’s distance. A common conventional definition additionally divides by a factor involving the number of fitted parameters and an estimate of the error variance. The unscaled expression above is still useful for seeing how leverage and residual size jointly determine influence.
5Autoregression
Autoregressive models use past values of a time series to predict its current value.
A zero-intercept AR() model is
where
- is the value of the time series at time ,
- are autoregressive coefficients,
- is a white-noise error term with mean zero and constant variance.
If a nonzero intercept is desired, one can instead write
For simplicity, consider the zero-intercept case. Given
define
and the lagged design matrix
Let
Then the AR model can be written as
Thus estimation of the AR coefficients can be viewed as a linear regression problem on lagged observations. The notation is used for the design matrix to avoid confusing it with the time-series variable .