Fitting a Regression Line

This applet illustrates how minimizing the sum of squared errors yields a regression line. Click on the "Display/Hide Error Squares" button to display the squared errors for each point. Drag the blue regression line so as to reduce the sum of squared errors. The meter on the left keeps track of your progress. The part of the original sum of squared errors that is reduced turns green and the proportion of the error meter that turns green is equivalent to r-sq. Click on the "Find Best Model" button to confirm that you have found the best-fitting regression line.