The method of least squares fits a line to a set of (x,y) data by choosing slope and intercept to minimize the SSE, or the sum of squared errors. A similar method, the method of least absolute deviations, fits a line to a set of (x,y) data by choosing slope and intercept to minimize the SAE, or sum of absolute errors. Both methods produce a line of "best fit", where different criteria define a "best fit" in each case. One of the differences between the two methods is that least absolute deviations line fitting is more robust than least squares line fitting. In other words, changes in data points affect the least absolute deviations regression line less than they affect the least squares regression line.
This exercise lets you compare and contrast these two fitting methods. Pseudo-random data points are generated for the exercise. They are generated to be positively correlated. The same data points are shown on two plots. One plot has a least squares regression line fitted to the points, and the other plot has a least absolute deviations regression line fitted to the points. The points in either plot can be dragged freely, and the data points in both plots will be updated.
The menu bar on the left side of this window will be available to you at all times during this lab. When the "Applet" link is clicked, a new window will open up with the exercise, and it will have steps to follow. By pressing "Next Step" or "Prev Step", the next or previous step can be visited. Once all instructions in the applet are completed, close the window. Move on to the "Questions" section after you are done with the exercise.
For more least squares background information, please see the Least Squares Wikipedia entry. For more least absolute deviations background information, please see the Least Absolute Deviations Wikipedia entry.