The plane fits y = β₀ + β₁x to the visible points by ordinary least squares, minimizing Σ(yᵢ − ŷᵢ)². But not every point pulls on that line equally — this simulator makes the difference visible in real time.
Leverage: hᵢᵢ = 1/n + (xᵢ − x̄)² / Σ(xⱼ − x̄)²
Std. resid: rᵢ = (yᵢ − ŷᵢ) / (s·√(1 − hᵢᵢ))
Cook's Dᵢ = rᵢ² · hᵢᵢ / (p·(1 − hᵢᵢ)), p = 2
- Leverage hᵢᵢ — how far a point sits from the mean of x, purely a function of its horizontal position. A point far to the left or right of the cloud has high leverage regardless of its y-value.
- Standardized residual rᵢ — how far the point falls from the fitted line, in units of the residual standard error.
- Cook's distance Dᵢ — combines both: it estimates how much the fitted coefficients would change if this one point were deleted. A rule of thumb flags Dᵢ > 4/n as influential (the red bar and red list row).
- Drag any point in the 3D view (orbit with the other mouse button) and watch the red bar for that point grow — a point can have huge leverage yet low Cook's distance if it happens to sit near the line, or the reverse for a point with an extreme y-value near the center of x.
- Inject high-leverage outlier drops a point far out on the x-axis with a deliberately mismatched y, the textbook demonstration of a single observation dragging the whole regression line toward it.
This is the diagnostic step every regression analysis needs before trusting its coefficients: R² and RMSE describe average fit, but Cook's distance finds the individual points quietly deciding the answer.