The Least-Squares Regression Line

Move a line through the scatterplot and watch the squares of the vertical distances from the points to the line. The least-squares regression line makes their total area as small as possible.

Scatterplot

Made-up data

Total area of the squares

My line
Least-squares regression line