Inside Collection (Textbook): Collaborative Statistics-Parzen ReMix
Summary: Linear Regression and Correlation: Outliers is a part of Collaborative Statistics collection (col10522) by Barbara Illowsky and Susan Dean. The module has been modified to include a graphical method for identifying outliers contributed by Roberta Bloom.
In some data sets, there are values (observed data points) called outliers. Outliers are observed data points that are far from the least squares line. They have large "errors", where the "error" or residual is the vertical distance from the line to the point.
Outliers need to be examined closely. Sometimes, for some reason or another, they should not be included in the analysis of the data. It is possible that an outlier is a result of erroneous data. Other times, an outlier may hold valuable information about the population under study and should remain included in the data. The key is to carefully examine what causes a data point to be an outlier.
Besides outliers, a sample may contain one or a few points that are called influential points. Influential points are observed data points that are far from the other observed data points in the horizontal direction. These points may have a big effect on the slope of the regression line. To begin to identify an influential point, you can remove it from the data set and see if the slope of the regression line is changed significantly.
Computers and many calculators can be used to identify outliers from the data. Computer output for regression analysis will often identify both outliers and influential points so that you can examine them.
We could guess at outliers by looking at a graph of the scatterplot and best fit line. However we would like some guideline as to how far away a point needs to be in order to be considered an outlier. As a rough rule of thumb, we can flag any point that is located further than two standard deviations above or below the best fit line as an outlier. The standard deviation used is the standard deviation of the residuals or errors.
We can do this visually in the scatterplot by drawing an extra pair of lines that are two standard deviations above and below the best fit line. Any data points that are outside this extra pair of lines are flagged as potential outliers. Or we can do this numerically by calculating each residual and comparing it to twice the standard deviation. On the TI-83, 83+, or 84+, the graphical approach is easier. The graphical procedure is shown first, followed by the numerical calculations. You would generally only need to use one of these methods.
In the third exam/final exam example, you can determine if there is an outlier or not. If there is an outlier, as an exercise, delete it and fit the remaining data to a new line. For this example, the new line ought to fit the remaining data better. This means the SSE should be smaller and the correlation coefficient ought to be closer to 1 or -1.
With the TI-83,83+,84+ graphing calculators, it is easy to
identify the outlier graphically and visually. If we were to measure the vertical distance from any data point to the corresponding point on the line of best fit and that distance was equal to
As we did with the equation of the regression line and the correlation coefficient, we will use technology to calculate this standard deviation for us. Using the LinRegTTest with this data, scroll down through the output screens to find s=16.412
Line Y2=-173.5+4.83
where
Graph the scatterplot with the best fit line in equation Y1, then enter the two extra lines as Y2 and Y3 in the "Y="equation editor and press ZOOM 9. You will find that the only data point that is not between lines Y2 and Y3 is the point x=65, y=175. On the calculator screen it is just barely outside these lines. The outlier is the student who had a grade of 65 on the third exam and 175 on the final exam; this point is further than 2 standard deviations away from the best fit line.
Sometimes a point is so close to the lines used to flag outliers on the graph that it is difficult to tell if the point is between or outside the lines. On a computer, enlarging the graph may help; on a small calculator screen, zooming in may make the graph clearer. Note that when the graph does not give a clear enough picture, you can use the numerical comparisons to identify outliers.
![]() |
In the table below, the first two columns are the third exam and final exam data.
The third column shows the predicted
Rather than calculate the value of
| 65 | 175 | 140 | |
|---|---|---|---|
| 67 | 133 | 150 | |
| 71 | 185 | 169 | |
| 71 | 163 | 169 | |
| 66 | 126 | 145 | |
| 75 | 198 | 189 | |
| 67 | 153 | 150 | |
| 70 | 163 | 164 | |
| 71 | 159 | 169 | |
| 69 | 151 | 160 | |
| 69 | 159 | 160 |
We are looking for all data points for which the residual is greater than
Numerically and graphically, we have identified the point (65,175) as an outlier. We should re-examine the data for this point to see if there are any problems with the data. If there is an error we should fix the error if possible, or delete the data. If the data is correct, we would leave it in the data set. For this problem, we will suppose that we examined the data and found that this outlier data was an error. Therefore we will continue on and delete the outlier, so that we can explore how it affects the results, as a learning experience.
On the TI-83, TI-83+, TI-84+ calculators, delete the outlier from L1 and L2. Using the LinRegTTest, the new line of best fit and the correlation coefficient are:
The new line with
If you do not have the function LinRegTTest, then you can calculate the outlier in the first example by doing the following.
First, square each
The squares are
Then, add (sum) all the
Next, calculate
The calculation is
For the third exam/final exam problem,
Next, multiply
31.29 is almost 2 standard deviations away from the mean of the
If we were to measure the vertical distance from any data point to the corresponding point on the line of best fit and that distance is at least
For the example, if any of the
For the third exam/final exam problem, all the
The point which corresponds to
The next step is to compute a new best-fit line using the 10 remaining
points. The new line of best fit and the correlation coefficient are:
Using this new line of best fit (based on the remaining 10 data points), what would a student who receives a 73 on the third exam expect to receive on the final exam? Is this the same as the prediction made using the original line?
Using the new line of best fit,
The original line predicted
(From The Consumer Price Indexes Web site) The Consumer Price Index
(CPI) measures the average change over time in the prices paid by urban consumers for
consumer goods and services. The CPI affects nearly all Americans because of the many ways
it is used. One of its biggest uses is as a measure of inflation. By providing information about
price changes in the Nation's economy to government, business, and labor, the CPI helps them
to make economic decisions. The President, Congress, and the Federal Reserve Board use the
CPI's trends to formulate monetary and fiscal policies. In the following table,
| 1915 | 10.1 |
| 1926 | 17.7 |
| 1935 | 13.7 |
| 1940 | 14.7 |
| 1947 | 24.1 |
| 1952 | 26.5 |
| 1964 | 31.0 |
| 1969 | 36.7 |
| 1975 | 49.3 |
| 1979 | 72.6 |
| 1980 | 82.4 |
| 1986 | 109.6 |
| 1991 | 130.7 |
| 1999 | 166.6 |
![]() |
If you are interested in seeing more years of data, visit the Bureau of Labor Statistics CPI website ftp://ftp.bls.gov/pub/special.requests/cpi/cpiai.txt ; our data is taken from the column entitled "Annual Avg." (third column from the right). For example you could add more current years of data. Try adding the more recent years 2004 : CPI=188.9, 2008 : CPI=215.3 and 2011: CPI=224.9. See how it affects the model.
(Check:
**With contributions from Roberta Bloom
"Reviewer's Comments: 'I recommend this book. Overall, the chapters are very readable and the material presented is consistent and appropriate for the course. A wide range of exercises introduces […]"