General · Bivariate · manipulative

Least-squares line through the cloud

Drag points or edit the table — every vertical residual and the residual plot update with the fitted line ŷ = a + bx.

data ŷ = a + bx (x̄, ȳ) residual

Scatter and fitted line

Residual plot · x vs (y − ŷ)

Drag a point · every residual is the vertical gap to the line · residual plot shares the same x-scale

Presets

Display

Show residuals on scatter
vertical segment from every point down to the line

Data

#xy

Working

Least-squares minimises the sum of squared vertical residuals y − ŷ. Every gap is drawn above; the lower plot shows the same residuals against x.