Math · Advanced · Lesson 6 of 7
Least Squares
The best line through messy data
An interactive lesson with 6 steps, about 5 minutes: you predict, drag and solve, with instant feedback on every answer. It runs in your browser and needs JavaScript.
What you’ll learn
- Least squares finds the best approximate solution of an overdetermined system.
- Geometrically it’s a perpendicular projection, giving the normal equations AᵀAx = Aᵀb.
- The mean is the least-squares constant; the regression line passes through the mean point.
Steps
- Too many equations
- Fit the line
- Least squares is a projection
- A shadow
- The simplest fit
- Slope by formula