<< Chapter < Page Chapter >> Page >

Numerical identification of outliers: calculating s And finding outliers manually

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 | y - y ^ | (See the TABLE above):

The squares are

  • 35 2
  • 17 2
  • 16 2
  • 6 2
  • 19 2
  • 9 2
  • 3 2
  • 1 2
  • 10 2
  • 9 2
  • 1 2

Then, add (sum) all the | y - y ^ | squared terms using the formula

Σ i = 1 11 ( | y i - y ^ i | ) 2 = Σ i = 1 11 ε i 2 (Recall that y i - y ^ i = ε i .)

= 35 2 + 17 2 + 16 2 + 6 2 + 19 2 + 9 2 + 3 2 + 1 2 + 10 2 + 9 2 + 1 2

= 2440 = SSE . The result, SSE is the Sum of Squared Errors.

Next, calculate s , the standard deviation of all the y - y ^ = ε values where n = the total number of data points.

The calculation is s = SSE n - 2

For the third exam/final exam problem, s = 2440 11 - 2 = 16.47

Next, multiply s by 1.9 :
( 1.9 ) ( 16.47 ) = 31.29
31.29 is almost 2 standard deviations away from the mean of the y - y ^ values.

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 1.9 s , then we would consider the data point to be "too far" from the line of best fit. We call that point a potential outlier .

For the example, if any of the | y - y ^ | values are at least 31.29, the corresponding ( x , y ) data point is a potential outlier.

For the third exam/final exam problem, all the | y - y ^ | 's are less than 31.29 except for the first one which is 35.

35 > 31.29 That is, | y - y ^ | ( 1.9 ) ( s )

The point which corresponds to | y - y ^ | = 35 is ( 65 , 175 ) . Therefore, the data point ( 65 , 175 ) is a potential outlier. For this example, we will delete it. (Remember, we do not always delete an outlier.)

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:

y ^ = -355.19 + 7.39 x and r = 0.9121

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, y ^ = -355.19 + 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 y ^ = -173.51 + 4.83(73) = 179.08 so the prediction using the new line with the outlier eliminated differs from the original prediction.

( 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 waysit 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 themto 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, 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 y ^ = a + b x .
  • Draw the line on the scatterplot.
  • Find the correlation coefficient. Is it significant?
  • What is the average CPI for the year 1990?
  • Scatter plot and line of best fit.
  • y ^ = -3204 + 1.662 x 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.
  • y ^ = -3204 + 1.662 ( 1990 ) = 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.)
Scatter plot and line of best fit of the consumer price index data, on the y-axis, and year data, on the x-axis.
In the example, 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, 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: y ^ = -4436 + 2.295 x . r = 0.9018 . Is r significant? Is the fit better with the addition of the new points?)

**With contributions from Roberta Bloom

Questions & Answers

A golfer on a fairway is 70 m away from the green, which sits below the level of the fairway by 20 m. If the golfer hits the ball at an angle of 40° with an initial speed of 20 m/s, how close to the green does she come?
Aislinn Reply
cm
tijani
what is titration
John Reply
what is physics
Siyaka Reply
A mouse of mass 200 g falls 100 m down a vertical mine shaft and lands at the bottom with a speed of 8.0 m/s. During its fall, how much work is done on the mouse by air resistance
Jude Reply
Can you compute that for me. Ty
Jude
what is the dimension formula of energy?
David Reply
what is viscosity?
David
what is inorganic
emma Reply
what is chemistry
Youesf Reply
what is inorganic
emma
Chemistry is a branch of science that deals with the study of matter,it composition,it structure and the changes it undergoes
Adjei
please, I'm a physics student and I need help in physics
Adjanou
chemistry could also be understood like the sexual attraction/repulsion of the male and female elements. the reaction varies depending on the energy differences of each given gender. + masculine -female.
Pedro
A ball is thrown straight up.it passes a 2.0m high window 7.50 m off the ground on it path up and takes 1.30 s to go past the window.what was the ball initial velocity
Krampah Reply
2. A sled plus passenger with total mass 50 kg is pulled 20 m across the snow (0.20) at constant velocity by a force directed 25° above the horizontal. Calculate (a) the work of the applied force, (b) the work of friction, and (c) the total work.
Sahid Reply
you have been hired as an espert witness in a court case involving an automobile accident. the accident involved car A of mass 1500kg which crashed into stationary car B of mass 1100kg. the driver of car A applied his brakes 15 m before he skidded and crashed into car B. after the collision, car A s
Samuel Reply
can someone explain to me, an ignorant high school student, why the trend of the graph doesn't follow the fact that the higher frequency a sound wave is, the more power it is, hence, making me think the phons output would follow this general trend?
Joseph Reply
Nevermind i just realied that the graph is the phons output for a person with normal hearing and not just the phons output of the sound waves power, I should read the entire thing next time
Joseph
Follow up question, does anyone know where I can find a graph that accuretly depicts the actual relative "power" output of sound over its frequency instead of just humans hearing
Joseph
"Generation of electrical energy from sound energy | IEEE Conference Publication | IEEE Xplore" ***ieeexplore.ieee.org/document/7150687?reload=true
Ryan
what's motion
Maurice Reply
what are the types of wave
Maurice
answer
Magreth
progressive wave
Magreth
hello friend how are you
Muhammad Reply
fine, how about you?
Mohammed
hi
Mujahid
A string is 3.00 m long with a mass of 5.00 g. The string is held taut with a tension of 500.00 N applied to the string. A pulse is sent down the string. How long does it take the pulse to travel the 3.00 m of the string?
yasuo Reply
Who can show me the full solution in this problem?
Reofrir Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply
Practice Key Terms 1

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Elementary statistics. OpenStax CNX. Dec 30, 2013 Download for free at http://cnx.org/content/col10966/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Elementary statistics' conversation and receive update notifications?

Ask