Why Measure Overall Case Influence?
A case can matter to a regression fit in more than one way. A large residual means its observed response is far from the fitted response, while high leverage means its predictor values are unusual relative to the other cases. Cook’s distance combines these features by measuring how much the fitted model changes when one case is removed. It is an overall influence measure: it summarizes the change across the model, rather than focusing on just one coefficient or one observation’s fitted value.
The comparison is between the ordinary least-squares fit using all \(n\) observations and the fit after deleting observation \(i\). To make the comparison meaningful, evaluate both fits at the original \(n\) predictor vectors, including the predictor vector for the deleted case. Cook’s distance is aligned with the SOA Exam SRM (Statistics for Risk Modeling) syllabus.
The usual working model assumes mean-zero errors with common variance and no correlation between observations, so that \(\operatorname{Var}(\varepsilon)=\sigma^2 I\). The calculation of \(D_i\) is an algebraic least-squares diagnostic; it does not require normally distributed errors. The estimate \(s^2\) is the full-model estimate of the error variance. Do not replace it with the variance estimate from the deleted fit when using the standard formula below.
From Case Deletion to the Formula
Write \(x_i\) for the column vector of predictors in row \(i\), including a 1 if the model has an intercept. The ordinary residual is \(e_i=y_i-x_i^\mathsf{T}\hat{\beta}\), and the leverage is \(h_{ii}=x_i^\mathsf{T}(X^\mathsf{T}X)^{-1}x_i\). If \(h_{ii}<1\), deleting the case leaves a full-rank design, and the coefficient change can be expressed directly in terms of \(e_i\) and \(h_{ii}\).
Set \(A=X^\mathsf{T}X\). The full fit satisfies \(A\hat{\beta}=X^\mathsf{T}y\). After deleting case \(i\), the design cross-product and response cross-product become \(A-x_ix_i^\mathsf{T}\) and \(X^\mathsf{T}y-x_i y_i\), respectively.
Let \(\Delta_i=\hat{\beta}-\hat{\beta}_{(i)}\). Subtracting the deleted normal equation from the full one gives \((A-x_ix_i^\mathsf{T})\Delta_i=x_i e_i\). Since \(h_{ii}=x_i^\mathsf{T}A^{-1}x_i\), the vector \(\Delta_i=A^{-1}x_i e_i/(1-h_{ii})\) satisfies this equation: multiplying it by \(A-x_ix_i^\mathsf{T}\) gives \(x_i e_i\).
The fitted-value difference is \(X\Delta_i\). Its squared length is \(\Delta_i^\mathsf{T}A\Delta_i\). Substituting the expression for \(\Delta_i\) gives \(e_i^2 x_i^\mathsf{T}A^{-1}x_i/(1-h_{ii})^2=e_i^2 h_{ii}/(1-h_{ii})^2\).
Dividing the squared fitted-value change by \(p s^2\), as in the definition, yields Cook’s distance.
The expression shows the two sources of influence. For a given leverage, a larger absolute residual increases \(D_i\); for a given residual, leverage increases the case’s capacity to change the fit. The denominator \((1-h_{ii})^2\) makes the measure particularly sensitive as leverage approaches 1. A small residual does not automatically imply a small Cook’s distance, nor does a large residual by itself determine influence.
Worked Calculations
Worked Example: Comparing Two Cases in the Same Fit
A hypothetical insurance severity regression has \(p=2\) fitted coefficients and full-fit \(s^2=4\), with variance measured in squared response units. Case A has residual \(e_A=2\) and leverage \(h_{AA}=0.25\). Case B has residual \(e_B=1\) and leverage \(h_{BB}=0.60\). Calculate both Cook’s distances and identify the more influential case. Method: substitute each case’s residual and leverage into the overall influence formula. Common mistake avoided: dropping the square on \(1-h_{ii}\).
For case A, the residual-and-model-size factor is \(e_A^2/(p s^2)=2^2/(2\cdot4)=4/8=0.5\). Its leverage factor is \(h_{AA}/(1-h_{AA})^2=0.25/(0.75)^2=0.25/0.5625=4/9\). Thus \(D_A=0.5(4/9)=2/9\), or \(0.2222\) to four decimal places.
For case B, \(e_B^2/(p s^2)=1^2/8=0.125\). Its leverage factor is \(0.60/(1-0.60)^2=0.60/(0.40)^2=0.60/0.16=3.75\). Thus \(D_B=0.125(3.75)=0.46875\), or \(0.4688\) to four decimal places.
Case B has the larger Cook’s distance, despite having the smaller residual. Its higher leverage makes deleting it change the fit more overall according to this measure. The comparison concerns influence on the fitted model; it does not by itself establish that either observation is erroneous.
Worked Example: Computing Influence for a Hypothetical Claim
A hypothetical claim-cost model has \(p=2\) coefficients, including an intercept. The full fit has \(s^2=9\), and one claim has residual \(e_i=3\) dollars and leverage \(h_{ii}=0.50\). Calculate Cook’s distance. Then interpret the result as a standardized summary of the change in the fitted values. Method: calculate the residual scale and leverage scale separately. Common mistake avoided: treating the residual alone as the influence measure.
First, the residual-and-model-size factor is \(e_i^2/(p s^2)=3^2/(2\cdot9)=9/18=0.5\). Next, the leverage factor is \(0.50/(1-0.50)^2=0.50/0.25=2\). Therefore \(D_i=0.5(2)=1.0000\).
The value is the sum of squared differences between the full-fit and deleted-fit fitted values, divided by \(p s^2\). Thus the aggregate squared change is \(1.0000(2)(9)=18\) squared dollars. This does not mean that every fitted value changes by one dollar: Cook’s distance aggregates changes over all \(n\) original design points and scales the result.
As a check, the case has a nonzero residual and leverage below 1, so the formula gives a positive, finite distance. The calculation uses the stated full-fit \(s^2=9\), not a re-estimated variance after deletion.
Worked Example: High Leverage Near the Case-Deletion Boundary
A hypothetical predictive model for policy renewals has \(p=3\) coefficients and full-fit \(s^2=2\). One policy has residual \(e_i=1.5\) and leverage \(h_{ii}=0.75\). Calculate Cook’s distance and check whether the formula is defined. Method: verify the leverage condition, then evaluate the formula. Common mistake avoided: overlooking the squared denominator, which can substantially understate influence here.
Because \(h_{ii}=0.75<1\), deleting the policy does not make the design rank deficient, so the formula is defined. The residual-and-model-size factor is \(e_i^2/(p s^2)=1.5^2/(3\cdot2)=2.25/6=0.375\).
The leverage factor is \(0.75/(1-0.75)^2=0.75/(0.25)^2=0.75/0.0625=12\). Therefore \(D_i=0.375(12)=4.5000\). As a check, the corresponding aggregate squared fitted-value change is \(4.5(3)(2)=27\) squared response units. The large distance is driven in part by the denominator becoming small at this high leverage.
Interpreting Size Without a Universal Cutoff
Cook’s distance is most useful as a screening and comparison measure. Compare cases within the same fitted model, inspect the largest values, and consider whether the fit or a substantive conclusion changes when a flagged case is investigated. A value around 1 or a rule based on \(4/n\) is sometimes used as a prompt for further inspection, but neither is a universal boundary between influential and noninfluential cases. Scale, sample size, predictor structure, and the purpose of the model all matter.
A large value is not proof of bad data and is not an automatic instruction to delete an observation. Check the recorded data, the case’s context, and whether the model assumptions or specification are reasonable. If the case is valid, it may represent an important part of the population that the model must accommodate. Report whether conclusions are sensitive to its inclusion rather than silently removing it.
Common Exam Trap: Losing a Factor
A frequent calculation error is to use \(h_{ii}/(1-h_{ii})\) rather than \(h_{ii}/(1-h_{ii})^2\). For case A in the first example, that incorrect calculation gives \(0.5(0.25/0.75)=0.1667\), which is not Cook’s distance. The correct leverage factor squares the denominator: \(0.25/(0.75)^2=4/9\), so the correct result is \(0.5(4/9)=2/9=0.2222\). Another common error is to count \(p\) as the number of predictors while forgetting the intercept; \(p\) counts all fitted coefficients.
Also distinguish Cook’s distance from the raw response residual and from leverage itself. Neither one alone measures the total change in fitted values after deletion. The formula combines both, with the leverage adjustment accounting for how the deleted case participates in fitting the model.
Check Your Understanding
For each problem, calculate or interpret the overall case influence, checking the leverage condition before applying the formula.
- A hypothetical frequency model has \(p=2\), \(s^2=4\), \(e_i=2\), and \(h_{ii}=0.25\). Calculate \(D_i\) to four decimal places. (Answer: \(D_i=2/9\approx0.2222\))
- A hypothetical repair-cost regression has \(p=3\), \(s^2=5\), \(e_i=2\), and \(h_{ii}=0.50\). Find the residual-and-model-size factor, leverage factor, and Cook’s distance to four decimal places. (Answer: factors \(4/15\approx0.2667\) and \(2\); \(D_i=8/15\approx0.5333\))
- Two cases in the same model have \(p=2\) and \(s^2=4\). Case A has \(e_A=2\), \(h_{AA}=0.25\); case B has \(e_B=1\), \(h_{BB}=0.60\). Compute both distances and state which case is more influential by this measure. (Answer: \(D_A=2/9\approx0.2222\), \(D_B=0.4688\); case B)
- A hypothetical lapse model has \(p=4\), \(s^2=3\), \(e_i=1\), and \(h_{ii}=0.80\). Calculate \(D_i\) and explain which part of the formula magnifies the result. (Answer: \(D_i=(1/12)(0.80/0.04)=5/3\approx1.6667\); the small squared denominator \((1-h_{ii})^2=0.04\))
- In a full-rank model with \(p=3\), \(s^2=2\), \(e_i=1.5\), and \(h_{ii}=0.75\), calculate Cook’s distance and determine whether the formula is defined. (Answer: \(D_i=(2.25/6)(0.75/0.0625)=4.5000\); defined because \(h_{ii}<1\))
- A case has \(h_{ii}=1\) in a full-rank design. Can the standard case-deletion Cook’s distance formula be used, even if \(e_i\) and \(s^2\) are known? Explain. (Answer: No. Deleting the case makes the design rank deficient, and the formula’s denominator \(1-h_{ii}\) is zero.)