Home > JavaSketchpad > Gallery > Least Squares

Least Squares

Sorry, this page requires a Java-compatible web browser.

Points P(1) through P(6) represent data points. A line is drawn through the points, and from each data point to the line a square is constructed. Drag the y-intercept and slope of the line so that the sum of the areas of the squares is minimized. That line is the least squares regression line for the data.

—Bill Finzer, March 1995, September 1997

Return to Gallery