Least squares may be the most popular method to fit a line to a set of (x,y) data, but it is not the only method. Another method is least absolute deviations. The method of least absolute deviations fits a line to a set of (x,y) data by choosing slope and intercept parameters to minimize the SAE, or the sum of absolute errors. As with the SSE associated with least squares, the errors in question are the differences between the actual y data values and the corresponding y values defined by the line.
This exercise lets you try to choose the least absolute deviations regression line by watching the SAE grow and shrink as you adjust a line. On the plot in the applet there is a vertical line segment from each data point to the line you are moving. The length of the segment is the absolute error corresponding to that data point. The SAE is the sum of these lengths.
The SAE is visualized with a bar whose length represents the sum of all the absolute errors. By adjusting the line, you will try to make the length of this bar as short as possible. When you think it is as short as you can get, you can look at the actual regression line, and compare it to your line. Near the end of the exercise, we will also demonstrate the fact that some sets of data points have more than one valid least absolute deviations line. This is not true with least squares regression: a least squares regression line is always a unique solution for any given data set.
This "non-uniqueness" property has some advantages and disadvantages. From one point of view, someone trying to analyze a set of data to find a trend will have problems if there are multiple solutions. On the other hand, perhaps the multiple solutions has helped show the analyst that the data may not have a trend at all!
This exercise assumes you are familiar with least squares regression. If you have not already done so, you may want to complete exercise 7.3a, which concerns least squares regression.
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 absolute deviations background information, please see the Least Absolute Deviations Wikipedia entry.