# 11.8 Outliers (modified r. bloom)

 Page 1 / 2
This module provides an overview of Linear Regression and Correlation: Outliers as a part of the Collaborative Statistics Custom Collection modified by Roberta Bloom. it is based on the module m17094 in collection col10522 by Barbara Illowsky and Susan Dean. This module has been modified to include a graphical method of identifying outliers that was not included in the original module m17094.

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 ofthe 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 examinewhat 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 but that greatly influence the line. As a result an influential point may be close to the line, even though it is far from the rest of the data. Because an influential point so strongly influences the best fit line, it generally will not have a large "error" or residual.

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.

## Identifying outliers

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 thisexample, 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.

## Graphical identification of outliers

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 $2s$ or farther, then we would consider the data point to be "too far" from the line of best fit. We need to find and graph the lines that are two standard deviations below and above the regression line. Any points that are outside these two lines are outliers. We will call these lines Y2 and Y3:

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.83x-2(16.4) and line Y3=-173.5+4.83X+2(16.4)

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 more clear. Note that when the graph does not give a clear enough picture, you can use the numerical comparisons to identify outliers.

## Numerical identification of outliers

In the table below, the first two columns are the third exam and final exam data. The third column shows the predicted $\stackrel{^}{y}$ values calculated from the line of best fit: $\stackrel{^}{y}$ =-173.5+4.83x. The residuals, or errors, have been calculated in the fourth column of the table: $\text{observed y value}-\text{predicted y value}=y-\stackrel{^}{y}$ .

$s$ is the standard deviation of all the $y-\stackrel{^}{y}=\epsilon$ values where $n$ = the total number of data points. If each residual is calculated and squared, and the results are added up, we get the SSE. The standard deviation of the residuals is calculated from the SSE as:

$s=\sqrt{\frac{\text{SSE}}{n-2}}$

Rather than calculate the value of s ourselves, we can find s using the computer or calculator. For this example, our calculator LinRegTTest found s=16.4 as the standard deviation of the residuals:

• 35
• -17
• 16
• -6
• -19
• 9
• 3
• -1
• -10
• -9
• -1
.

$x$ $y$ $\stackrel{^}{y}$ $y-\stackrel{^}{y}$
65 175 140 $175-140=35$
67 133 150 $133-150=-17$
71 185 169 $185-169=16$
71 163 169 $163-169=-6$
66 126 145 $126-145=-19$
75 198 189 $198-189=9$
67 153 150 $153-150=3$
70 163 164 $163-164=-1$
71 159 169 $159-169=-10$
69 151 160 $151-160=-9$
69 159 160 $159-160=-1$

We are looking for all data points for which the residual is greater than 2s=2(16.4)=32.8 or less than -32.8. Compare these values to the residuals in column 4 of the table. The only such data point is the student who had a grade of 65 on the third exam and 175 on the final exam; the residual for this student is 35.

## How does the outlier affect the best fit line?

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 to delete the outlier, so that we can explore how it affects the results, as a learning experience.

## Compute a new best-fit line and correlation coefficient using the 10 remaining points:

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:

$\stackrel{^}{y}=-355.19+\text{7.39x}$ and $r=0.9121$

The new line with $r=0.9121$ is a stronger correlation than the original ( $r$ =0.6631) because $r=0.9121$ is closer to 1. This means that the new line is a better fit to the 10 remaining data values. The line can better predict the final exam score given the third exam score.

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 $\stackrel{^}{y}=-355.19+\text{7.39(73)}$ = 184.28. A student who scored 73 points on the third exam would expect to earn 184 points on the final exam.

The original line predicted $\stackrel{^}{y}=-173.51+\text{4.83(73)}$ = 179.08 so the prediction using the new line with the outlier eliminated differs from the original prediction.

## Note:

Remember, we do not always delete an outlier. If upon examination, we determined this outlier to be a valid data point, we would leave it in the data.

( 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 forconsumer 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 aboutprice 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 theCPI's trends to formulate monetary and fiscal policies. In the following table, $x$ is the year and $y$ is the CPI.

Data:
$x$ $y$
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
• Make a scatterplot of the data.
• Calculate the least squares line. Write the equation in the form $\stackrel{^}{y}=a+\text{bx}$ .
• Draw the line on the scatterplot.
• Find the correlation coefficient. Is it significant?
• What is the average CPI for the year 1990?
• Are there any outliers in this data?
• Scatter plot and line of best fit.
• $\stackrel{^}{y}=-3204+\text{1.662x}$ is the equation of the line of best fit.
• $r=0.8694$
• The number of data points is $n=14$ . Use the 95% Critical Values of the Sample Correlation Coefficient table at the end of Chapter 12. $n-2=12$ . The corresponding critical value is 0.532. Since $0.8694>0.532$ , $r$ is significant.
• $\stackrel{^}{y}=-3204+1.662\left(1990\right)=103.4$ CPI
• Using the calculator LinRegTTest, we find that s = 25.4 ; graphing the lines Y2=-3204+1.662X-2(25.4) and Y3=-3204+1.662X+2(25.4) shows that no data values are outside those lines, identifying no outliers. (Note that the year 1999 was very close to the upper line, but still inside it.)

## Note:

In example 3, notice the pattern of the points compared to the line. Although the correlation coefficient is significant, the pattern in the scatterplot indicates that a curve would be a more appropriate model to use than a line. In this example, a statistician should prefer to use other methods to fit a curve to this data, rather than model the data with the line we found. In addition to doing the calculations, it is always important to look at the scatterplot when deciding whether a linear model is appropriate.

If you are interested in seeing more years of data for example 3, 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 and 2008 : CPI=215.3 and see how it affects the model.

Preparation and Applications of Nanomaterial for Drug Delivery
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
hi
Loga
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!