Interactive library

Geometry of Least Squares

Data space

The same fit as a line

Drag points vertically

least-squares line vertical residuals candidate line

Observation space

Projection in 3

rank(X) = 2 · plane

data y projection ŷ residual r other fit
Accessible numerical view Observation table Expand values
Observation xi yi ŷi ri