HomeStatisticsRegression Diagnostics: Leverage & Cook's Distance

Regression Diagnostics: Leverage & Cook's Distance

Drag data points on a 3D regression scatter and watch leverage, standardized residuals and Cook's distance update live — see exactly which points are quietly steering the fitted line.

Statistics3DModerate60 FPS
ds-topic-17 ↗ Open standalone

A regression line's coefficients are averages, but they aren't democratic — a single point far from the center of the data can steer the fit far more than the rest of the cloud combined. This simulator renders an ordinary-least-squares scatter in 3D, where each point's height above its base marker encodes its Cook's distance, recomputed on every frame as you drag points around or add a deliberately extreme outlier. Live readouts break the diagnostic into its two ingredients — leverage (how unusual a point's x-position is) and standardized residual (how far it falls from the line) — so you can see exactly why a point is or isn't influential, not just that it is.

⚙ Under the hood

Drag points on a live OLS regression scatter and watch leverage, standardized residuals and Cook's distance update in real time, revealing which observations are quietly steering the fitted line.

regressionstatisticscooks-distanceleverageoutliersdata-science

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)