Points P1 through P6 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.
Modified version of a GSP sketch by Bill Finzer, 3/95