AI Glossary / Statistics and probability / Intermediate
Cook's D
Definition
Cook's D, also called Cook's distance, measures how strongly one observation influences a fitted regression model. In ordinary least squares, it summarizes the change in fitted values across the dataset when that observation is omitted, scaled by the model's residual variance and number of fitted coefficients. A large value identifies a case worth investigating; it is not an automatic instruction to delete the observation.
What it means
Some observations substantially affect the estimated relationship, while others have little impact. Cook's D combines information about a case's residual and leverage. The residual describes disagreement with the fitted response; leverage reflects how unusual its predictor values are relative to the fitted design.
An unusual outcome, an unusual predictor configuration, and an influential observation are related but different ideas. A high-leverage point can closely follow the fitted relationship and have limited influence. Conversely, removing an influential observation can materially alter predictions or coefficients even when it is not the most visually obvious point in a simple plot.
How it works
Fit the intended regression and examine its design and residual diagnostics. For an ordinary least-squares model with p fitted coefficients, including the intercept when present, residual e_i, residual mean square s squared, and leverage h_i, the standard formula is D_i = [e_i squared/(p s squared)] [h_i/(1 - h_i) squared]. This expression assumes the usual deletion calculation is defined.
An equivalent view compares predictions from the full fit with predictions from a fit excluding case i, evaluated at all original predictor values. Sum the squared prediction changes and divide by p s squared from the full fit. The diagnostic is nonnegative and has no fixed upper bound.
Plot the values across cases and examine prominent observations alongside leverage, residuals, and substantive context. Rules such as a value above one or a sample-size-dependent threshold are screening heuristics, not universal hypothesis tests or data-quality standards.
Check the original record, measurement process, and model specification. A large value can reflect an error, a legitimate rare case, an omitted relationship, or limited data coverage. Compare conclusions with and without the case as a sensitivity analysis, documenting rather than hiding the difference.
The standard formula is for ordinary least squares. Other models have influence diagnostics with related ideas but different definitions or approximations. Multiple unusual observations can also mask one another, so a single-case diagnostic is not a complete robustness assessment.
Three practical examples
- A forecasting analyst identifies a business period that strongly changes the fitted sales trend.
- A quality team checks whether one unusually configured production run dominates a regression estimate.
- An AI analyst examines influential training observations in a simple linear baseline before interpreting its coefficients or comparing it with more complex models.
Think of it this way
Think of Cook's D as a test of how much the fitted structure moves when one support is temporarily removed. A support that causes a large movement deserves inspection. That does not mean it is defective; it may be carrying important information that the other observations do not provide.
Worked example
Fit an ordinary least-squares line with an intercept to five observations: predictor values 0, 1, 2, 3, 4 and response values 1, 2, 3, 4, 8. The fitted line is y-hat = 0.4 + 1.6x. Its residuals are 0.6, 0, -0.6, -1.2, and 1.2.
The residual sum of squares is 3.6. With five observations and two fitted coefficients, s squared = 3.6/3 = 1.2. The last observation has leverage 1/5 + (4 - 2)^2/10 = 0.6.
Its Cook's D is [1.2 squared/(2 x 1.2)] x [0.6/(1 - 0.6)^2] = 2.25. To verify by deletion, removing the last observation leaves the exact line y-hat = 1 + x. Comparing full-fit and deleted-fit predictions at all five original x values gives squared changes summing to 5.4. Dividing by 2 x 1.2 again gives 2.25.
The last case materially influences this tiny fitted line. Whether it should remain depends on whether the measurement is valid and whether the linear model is appropriate. The diagnostic itself does not settle either question.
Illustrative case study
Fictional case: Ashwood Logistics fits a linear relationship between shipment size and processing time. One large shipment has a prominent Cook's D. The analyst checks the source record and confirms that the measurement is genuine, but the shipment required a different handling process.
The team reports the original fit and a sensitivity analysis, then considers a model that represents handling type and whether the linear relationship is adequate. It does not quietly remove the shipment merely to improve a significance result. The influential case reveals a modeling question and a gap in coverage for large shipments.
Common misconceptions and mistakes
A large Cook's D does not prove that a record is wrong. A small value does not establish that the entire model is well specified. Do not confuse leverage with influence or use a rule-of-thumb cutoff as a universal pass/fail threshold. Deleting observations until a preferred conclusion appears invalidates an honest analysis. Also, influence on the full fitted model may differ from influence on a particular coefficient or operational prediction.
Business use
Cook's D helps businesses understand whether an estimated relationship depends heavily on a few cases. Use it before relying on regression coefficients for planning, forecasting, or performance comparisons. Preserve an audit trail for data corrections and exclusions. When a legitimate case drives the result, explain the sensitivity and consider whether more data or a better model is needed for the decision.
People also ask
Is Cook's D a probability?
No; it is a scaled influence measure.
Can it exceed one?
Yes, as the worked example shows.
Must a model be refitted separately for every case?
For ordinary least squares, equivalent formulas use residuals and leverage, avoiding repeated fits. Explicit deletion remains useful for interpreting how conclusions change.
Check your understanding
What two ingredients make the last observation influential in the example?
Answer: Its residual and leverage together.
Why is p equal to two?
Answer: The model estimates an intercept and a slope.
Does D = 2.25 justify automatic deletion?
Answer: No; investigate the case and assess its substantive and modeling context.
Related terms
- Leverage
- Residual
- Ordinary Least Squares
- Sensitivity analysis
- Influence diagnostic
- hat matrix
- DFFITS
- DFBETAS
Learn next
Compare Cook's D with leverage and studentized residual plots on a small regression dataset. Then examine case-deletion changes in the specific coefficient or prediction that matters to the business question.
More in Statistics and probability
- Control variates - Control variates are a variance-reduction technique that uses a correlated quantity with a known expected value to improve a Monte Carlo estimate.
- Controlling for a variable - Controlling for a variable means accounting for it when making a statistical comparison or estimating a relationship.
- Convenience sample - A convenience sample is a sample selected because its members are easy to reach or readily available, rather than through a probability sampling design with...
- Correct sampling - Correct sampling is a technical principle in Pierre Gy's theory of sampling for particulate materials: every constituent particle of the lot should have an...
- Correlation - Correlation describes a statistical association between variables, often summarized by a coefficient indicating its direction and strength.
- Correlation coefficient - A correlation coefficient is a numerical summary of the direction and strength of a specified association between variables.
Sources
NIST Dataplot, Regression Diagnostics, Cook's distance formula and influence discussion: https://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/regrdiag.htm David C. Howell, Statistical Methods for Psychology glossary: https://www.uvm.edu/~statdhtx/methods8/Glossary/Glossary.html
Previous: Convolutional operation Next: Cooperative coevolution