StatisticsExploring Two-Variable Data7 of 8
Exploring Two-Variable Data · 7

Outliers and Influential Points

We want to know why one unusual data point can completely tilt a least-squares regression line, while another unusual point barely moves the line at all.

1

The Regression Line as a Seesaw

To see how a single point pulls on a regression line, we can picture the line of best fit as a stiff rod balanced by vertical rubber bands from the data points.

The Regression Line as a Seesaw
price\htmlClass{lc-ink}{\text{price}}
size\htmlClass{lc-ink}{\text{size}}

Because we use x\datum{x} to predict y\datum{y}, every residual is a purely vertical distance d\resid{d}. Least-squares regression minimizes the sum of squared vertical residuals, so a point twice as far vertically from the line adds four times as much to the sum of squares and pulls twice as hard on the rod:

Vertical residual d⟶Squared residual d2,Vertical pull FVertical residual 2d⟶Squared residual (2d)2=4d2,Vertical pull 2F\displaystyle \begin{aligned} &\text{Vertical residual } \resid{d} \longrightarrow \\ &\quad \text{Squared residual } \resid{d^2}, \\ &\quad \text{Vertical pull } \resid{F} \\[8pt] &\text{Vertical residual } 2\resid{d} \longrightarrow \\ &\quad \text{Squared residual } (2\resid{d})^2 = 4\resid{d^2}, \\ &\quad \text{Vertical pull } 2\resid{F} \end{aligned}

Every least-squares regression line must pass through the center of the data at the mean of x\datum{x} and the mean of y\datum{y}, (xˉ,yˉ)\fitted{(\bar{x}, \bar{y})}, which acts as the hinge of the seesaw.

2

Outliers, High Leverage, and Influential Points

Once we know the line pivots at (xˉ,yˉ)\fitted{(\bar{x}, \bar{y})}, we can separate three ways a data point can stand out (an outlier, a high-leverage point, and an influential point) and see what each one does to the slope, yy-intercept, s\stdres{s}, rr, and r2\rsq{r^2}.

Outliers, High Leverage, and Influential Points
price\htmlClass{lc-ink}{\text{price}}
size\htmlClass{lc-ink}{\text{size}}
xˉ\htmlClass{lc-violet}{\bar x}
yˉ\htmlClass{lc-violet}{\bar y}
slope\htmlClass{lc-pink}{\text{slope}}
intercept\htmlClass{lc-violet}{\text{intercept}}
rr
−1\htmlClass{lc-mute}{-1}
0\htmlClass{lc-mute}{0}
1\htmlClass{lc-mute}{1}
r2\htmlClass{lc-green}{r^2}
s\htmlClass{lc-orange}{s}
price\htmlClass{lc-ink}{\text{price}}
size\htmlClass{lc-ink}{\text{size}}
xˉ\htmlClass{lc-violet}{\bar x}
(xˉ,yˉ)\htmlClass{lc-violet}{(\bar x, \bar y)}
outlier\htmlClass{lc-ink}{\text{outlier}}
original line\htmlClass{lc-violet}{\text{original line}}
price\htmlClass{lc-ink}{\text{price}}
size\htmlClass{lc-ink}{\text{size}}
xˉ\htmlClass{lc-violet}{\bar x}
leverage\htmlClass{lc-pink}{\text{leverage}}
high leverage\htmlClass{lc-ink}{\text{high leverage}}
price\htmlClass{lc-ink}{\text{price}}
size\htmlClass{lc-ink}{\text{size}}
xˉ\htmlClass{lc-violet}{\bar x}
leverage\htmlClass{lc-pink}{\text{leverage}}
influential\htmlClass{lc-ink}{\text{influential}}
original line\htmlClass{lc-violet}{\text{original line}}

Each case combines horizontal distance from xˉ\fitted{\bar{x}} (leverage) and vertical distance from the trend in a different way:

Now let's test how each type of point shows up in a house-price scatterplot.

A single added point only tilts the regression line when it sits far from the horizontal center and pulls vertically away from the line.
3

Why Residual Plots Miss Influential Points

If we skip the scatterplot and check for unusual points by looking only at a residual plot, we can miss the most influential points.

Why Residual Plots Miss Influential Points
price\htmlClass{lc-ink}{\text{price}}
size\htmlClass{lc-ink}{\text{size}}
xˉ\htmlClass{lc-violet}{\bar x}
influential\htmlClass{lc-ink}{\text{influential}}
residual\htmlClass{lc-ink}{\text{residual}}
size\htmlClass{lc-ink}{\text{size}}
0\htmlClass{lc-mute}{0}

As a low-price house off the trend sits further to the right of xˉ\fitted{\bar{x}}, its growing leverage pulls the right end of the regression line down toward itself. Once it is far out past the other houses, its own residual on the residual plot is smaller than it was near xˉ\fitted{\bar{x}}, while the other houses' residuals are larger, and removing the point lets the line return to the trend of the other houses.

As an outlier moves out toward the edge, it pulls the regression line toward itself and hides its own residual.
4

Spotting Influential Points in Regression Output

When we are given the regression numbers with and without an unusual point instead of a graph, we can tell whether the point is influential and where it sits. Both a central outlier and an influential point can cause a big jump in s\stdres{s} and a big drop in r2\rsq{r^2}, so always look at the slope first to see if the seesaw tilted.

Let's compare the regression of sale price (in thousands of dollars) on house size (in thousands of square feet) for n=15n = 15 houses with and without a 6.0\datum{6.0}-thousand-square-foot house that sold for 250\datum{250} thousand dollars, and then compare that with a second unusual house.

Spotting Influential Points in Regression Output
all 15 houses\htmlClass{lc-ink}{\text{all 15 houses}}
predicted price=180+75 (size)\htmlClass{lc-violet}{\text{predicted price}} = \htmlClass{lc-violet}{180} + \htmlClass{lc-pink}{75}\,\htmlClass{lc-blue}{(\text{size})}
r=0.58r2=33.6%s=173.4r = 0.58 \qquad \htmlClass{lc-green}{r^2} = \htmlClass{lc-green}{33.6\%} \qquad \htmlClass{lc-orange}{s} = \htmlClass{lc-orange}{173.4}
other 14 houses\htmlClass{lc-ink}{\text{other 14 houses}}
predicted price=50+175 (size)\htmlClass{lc-violet}{\text{predicted price}} = \htmlClass{lc-violet}{50} + \htmlClass{lc-pink}{175}\,\htmlClass{lc-blue}{(\text{size})}
r=0.94r2=88.4%s=75.2r = 0.94 \qquad \htmlClass{lc-green}{r^2} = \htmlClass{lc-green}{88.4\%} \qquad \htmlClass{lc-orange}{s} = \htmlClass{lc-orange}{75.2}
price (1000 dollars)\htmlClass{lc-ink}{\text{price (1000 dollars)}}
size (1000 ft2)\htmlClass{lc-ink}{\text{size}}\ \text{(1000 ft}^2\text{)}
0\htmlClass{lc-mute}{0}
1\htmlClass{lc-mute}{1}
2\htmlClass{lc-mute}{2}
3\htmlClass{lc-mute}{3}
4\htmlClass{lc-mute}{4}
5\htmlClass{lc-mute}{5}
6\htmlClass{lc-mute}{6}
7\htmlClass{lc-mute}{7}
400\htmlClass{lc-mute}{400}
800\htmlClass{lc-mute}{800}
1200\htmlClass{lc-mute}{1200}
(6.0, 250)\htmlClass{lc-blue}{(6.0,\ 250)}
Text solution
Compare the slope and yy-intercept with and without the first houseRemoving the 6.0\datum{6.0}-thousand-square-foot house more than doubles the slope and drops the yy-intercept, which shows that this single point tilted the seesaw and is influential.
All 15 houses:predicted price=180+75(size)Other 14 houses:predicted price=50+175(size)Change when removed:slope 75⟶175,y-intercept 180⟶50\displaystyle \begin{aligned} &\text{All 15 houses:} \\ &\begin{aligned} \fitted{\text{predicted price}} &= \fitted{180} + \slope{75}(\datum{\text{size}}) \end{aligned} \\[8pt] &\text{Other 14 houses:} \\ &\begin{aligned} \fitted{\text{predicted price}} &= \fitted{50} + \slope{175}(\datum{\text{size}}) \end{aligned} \\[8pt] &\text{Change when removed:} \\ &\begin{aligned} \text{slope } \slope{75} &\longrightarrow \slope{175}, \\ y\text{-intercept } \fitted{180} &\longrightarrow \fitted{50} \end{aligned} \end{aligned}
Check how the tilted line changes s\stdres{s} and r2\rsq{r^2}Putting that extreme house back in pulls the right end of the line down and away from the other 1414 houses, increasing the typical vertical error s\stdres{s} and making r2\rsq{r^2} drop sharply.
Other 14 houses:r=0.94,r2=88.4%,s=75.2textAll15houses:r=0.58,r2=33.6%,s=173.4\displaystyle \begin{aligned} &\text{Other 14 houses:} \\ &\begin{aligned} r &= 0.94, \\ \rsq{r^2} &= \rsq{88.4\%}, \\ \stdres{s} &= \stdres{75.2} \\\end{aligned} \\[8pt]&text{All 15 houses:} \\ &\begin{aligned} r &= 0.58, \\ \rsq{r^2} &= \rsq{33.6\%}, \\ \stdres{s} &= \stdres{173.4} \end{aligned} \end{aligned}
Contrast with the second scenario where the slope barely movesWhen removing a different unusual house leaves the slope almost identical even though s\stdres{s} drops and r2\rsq{r^2} rises, the point has almost no leverage and is a non-influential vertical outlier near xˉ\fitted{\bar{x}}.
With the point:predicted price=96+172(size),r2=54.0%,s=180.7textWithoutthepoint:predicted price=50+175(size),r2=88.4%,s=75.2textChangewhenremoved:slope 172⟶175(line barely tilts)\displaystyle \begin{aligned} &\text{With the point:} \\ &\begin{aligned} \fitted{\text{predicted price}} &= \fitted{96} + \slope{172}(\datum{\text{size}}), \\ \rsq{r^2} &= \rsq{54.0\%}, \\ \stdres{s} &= \stdres{180.7} \\\end{aligned} \\[8pt]&text{Without the point:} \\ &\begin{aligned} \fitted{\text{predicted price}} &= \fitted{50} + \slope{175}(\datum{\text{size}}), \\ \rsq{r^2} &= \rsq{88.4\%}, \\ \stdres{s} &= \stdres{75.2} \\\end{aligned} \\[8pt]&text{Change when removed:} \\ &\begin{aligned} \text{slope } \slope{172} &\longrightarrow \slope{175} \\ &\quad (\text{line barely tilts}) \end{aligned} \end{aligned}

So the first house is an influential high-leverage point far from xˉ\fitted{\bar{x}} that pulls the line away from the main trend, while the second house is a vertical outlier sitting near the average house size xˉ\fitted{\bar{x}}.

5

What to Do With an Unusual Point

When you find an outlier or an influential point that changes your regression results, you still have to decide whether it belongs in the model, and you should never delete a point just to make r2\rsq{r^2} look higher.

What to Do With an Unusual Point
price (1000 dollars)\htmlClass{lc-ink}{\text{price (1000 dollars)}}
size (1000 ft2)\htmlClass{lc-ink}{\text{size}}\ \text{(1000 ft}^2\text{)}
0\htmlClass{lc-mute}{0}
1\htmlClass{lc-mute}{1}
2\htmlClass{lc-mute}{2}
3\htmlClass{lc-mute}{3}
4\htmlClass{lc-mute}{4}
5\htmlClass{lc-mute}{5}
6\htmlClass{lc-mute}{6}
7\htmlClass{lc-mute}{7}
400\htmlClass{lc-mute}{400}
800\htmlClass{lc-mute}{800}
1200\htmlClass{lc-mute}{1200}
(6.0, 250)\htmlClass{lc-blue}{(6.0,\ 250)}

Instead of throwing an unusual point away automatically, check three possibilities in order:

Key concepts

Every least-squares regression line pivots on the center of the data, (xˉ,yˉ)\fitted{(\bar{x}, \bar{y})}, and balances vertical pulls that minimize squared vertical residuals: doubling a point's vertical distance from d\resid{d} to 2d2\resid{d} quadruples its squared residual from d2\resid{d^2} to 4d24\resid{d^2} and doubles its pull from F\resid{F} to 2F2\resid{F}.

To tell what an unusual point is doing, check both where it sits horizontally relative to xˉ\fitted{\bar{x}} (its leverage) and whether it breaks the vertical pattern:

Large residual near xˉ\fitted{\bar{x}} (vertical outlier, not influential)

Pulling right over the hinge at xˉ\fitted{\bar{x}} cannot tilt the seesaw. The slope barely changes (predicted price=96+172(size)\fitted{\text{predicted price}} = \fitted{96} + \slope{172}(\datum{\text{size}}) vs. 50+175(size)\fitted{50} + \slope{175}(\datum{\text{size}})), and the yy-intercept goes up only because the whole line moves up, while the large vertical residual makes s\stdres{s} jump and r2\rsq{r^2} drop.

Far from xˉ\fitted{\bar{x}} but right on the line (high leverage, neither an outlier nor influential)

Do not assume every extreme x\datum{x}-value ruins a regression. If a point far from xˉ\fitted{\bar{x}} sits right on the line's path (near-zero residual), it holds the line in place: the slope, yy-intercept, and s\stdres{s} stay nearly unchanged, while r2\rsq{r^2} increases because the linear trend now spans a much wider range.

Far from xˉ\fitted{\bar{x}} and off the trend (influential point)

High leverage combined with a vertical pull tilts the seesaw, causing a large change in the slope and yy-intercept (predicted price=180+75(size)\fitted{\text{predicted price}} = \fitted{180} + \slope{75}(\datum{\text{size}}) vs. 50+175(size)\fitted{50} + \slope{175}(\datum{\text{size}})). If it pulls the line away from a tight trend, s\stdres{s} rises and r2\rsq{r^2} drops; if it connects a random cloud of points (r≈0r \approx 0) to a single extreme point, it makes r2\rsq{r^2} jump up and creates a false linear trend.

Because an influential point pulls the fitted line close to itself, its own residual often looks small on a residual plot. Always test a suspect point by deleting it and re-running the regression. If the point is real data rather than an error or a curved trend needing a log or power transformation, report the regression both with and without the point.

6

Practice

1

A dataset of 20 used cars shows a strong negative linear relationship between mileage (x\datum{x}, in thousands of miles, with xˉ=50\fitted{\bar{x}} = 50) and price (y\datum{y}, in thousands of dollars). A 21st car is added with x=50\datum{x} = 50 thousand miles that sold for 25 thousand dollars more than predicted by the original regression line. Using the seesaw model, explain how adding this car affects the slope, yy-intercept, s\stdres{s}, rr, and r2\rsq{r^2}.

Compare the new car's mileage (x=50\datum{x} = 50) with the horizontal center xˉ=50\fitted{\bar{x}} = 50: how much leverage does a vertical pull have when it sits directly over the pivot?

Because the car's mileage is right at the horizontal center (x=xˉ=50\datum{x} = \fitted{\bar{x}} = 50), it pulls straight up over the pivot point of the seesaw and has zero leverage. (Watch out for the common mistake of assuming a huge +25\resid{+25}-thousand-dollar residual must tilt the slope; without horizontal distance from xˉ\fitted{\bar{x}}, it cannot tilt the line.) The slope stays almost identical, while pulling the average y\datum{y} up slightly lifts the entire line and increases the yy-intercept by a small amount. Because the point has a huge vertical residual, the standard deviation of the residuals s\stdres{s} increases a lot, the negative correlation rr weakens (moves closer to 00, not closer to −1-1), and r2\rsq{r^2} decreases.
2

In a study of study time (x\datum{x}, in hours) and exam score (y\datum{y}, in points), most students studied between 1 and 4 hours, giving the least-squares regression line y^=55+8x\fitted{\hat{y}} = \fitted{55} + \slope{8}\datum{x} with r=0.78r = 0.78 and s=4.5\stdres{s} = \stdres{4.5}. One additional student studied for 9 hours and scored 127 points. Is this student an outlier, a high-leverage point, or an influential point, and how does adding this student affect the slope, yy-intercept, s\stdres{s}, and r2\rsq{r^2}?

Before deciding whether the point tilts the seesaw, plug x=9\datum{x} = \datum{9} into y^=55+8x\fitted{\hat{y}} = \fitted{55} + \slope{8}\datum{x} to check its vertical residual.

At x=9\datum{x} = \datum{9}, the existing line predicts
y^\displaystyle \fitted{\hat{y}} =55+8(9)\displaystyle = \fitted{55} + \slope{8}(\datum{9}) =127 points\displaystyle = \fitted{127} \text{ points}
so this student sits right on the path of the line with a residual of 0\resid{0}, but far above the other x\datum{x}-values. (Don't call this student an outlier or influential point just because 9\datum{9} hours and 127\datum{127} points are much larger than the rest of the class; the vertical residual from the trend is 0\resid{0}.) The point has high leverage, is neither an outlier nor an influential point, and holds the line steady: the slope and yy-intercept barely change, s\stdres{s} stays about the same or decreases slightly, and r2\rsq{r^2} increases substantially (rather than staying at 0.782=60.8%0.78^2 = \rsq{60.8\%}) because the linear pattern now stretches across a much wider horizontal and vertical range without adding vertical scatter.
3

An economist studying 16 neighborhoods fits a regression of median rent (y\datum{y}, in hundreds of dollars) on distance from downtown (x\datum{x}, in miles) and finds y^=28.0−1.50x\fitted{\hat{y}} = \fitted{28.0} - \slope{1.50}\datum{x}, r2=86.0%\rsq{r^2} = \rsq{86.0\%}, and s=1.8\stdres{s} = \stdres{1.8}. She then tests adding one more unusual neighborhood in two separate scenarios:

  • Scenario A (with Neighborhood A included): y^=28.7−1.48x\fitted{\hat{y}} = \fitted{28.7} - \slope{1.48}\datum{x}, r2=52.0%\rsq{r^2} = \rsq{52.0\%}, s=4.1\stdres{s} = \stdres{4.1}
  • Scenario B (with Neighborhood B included): y^=22.0−0.55x\fitted{\hat{y}} = \fitted{22.0} - \slope{0.55}\datum{x}, r2=31.0%\rsq{r^2} = \rsq{31.0\%}, s=3.9\stdres{s} = \stdres{3.9}

For each scenario, determine whether the added neighborhood is influential and describe where it sits on the scatterplot relative to xˉ\fitted{\bar{x}} and the original line.

Compare the slopes with and without the point first (−1.50\slope{-1.50} versus −1.48\slope{-1.48} and −0.55\slope{-0.55}), rather than judging influence by the drop in r2\rsq{r^2}.

In Scenario A, the slope barely changes (−1.50\slope{-1.50} to −1.48\slope{-1.48}) while s\stdres{s} jumps from 1.8\stdres{1.8} to 4.1\stdres{4.1} and r2\rsq{r^2} drops from 86.0%\rsq{86.0\%} to 52.0%\rsq{52.0\%}. (Be careful not to call Neighborhood A influential just because r2\rsq{r^2} dropped by 3434 percentage points; an influential point must change the line itself.) Neighborhood A is not influential; it is a vertical outlier sitting near the average distance xˉ\fitted{\bar{x}} and well above the regression line (lifting the intercept slightly from 28.0\fitted{28.0} to 28.7\fitted{28.7}). In Scenario B, the slope changes drastically (−1.50\slope{-1.50} to −0.55\slope{-0.55}) and the yy-intercept drops from 28.0\fitted{28.0} to 22.0\fitted{22.0}. Neighborhood B is an influential point with high leverage sitting far from xˉ\fitted{\bar{x}} and far off the original trend line, pulling the line toward itself and away from the other 16 neighborhoods.
4

Without looking at a scatterplot, an analyst checks a residual plot to look for unusual points. Point P sits near xˉ\fitted{\bar{x}} and 10 units above the trend of the rest of the data, while Point Q sits at the far right edge of the x\datum{x}-values and 20 units below the trend of the rest of the data. (a) Before the line tilts, how many times harder does a rubber band stretched 20 units pull on the line than one stretched 10 units, and how many times as much does it add to the sum of squared residuals? (b) Why can Point Q end up with a smaller residual on the fitted residual plot than Point P, and how should the analyst test whether Point Q is changing the regression line?

(a) Compare the ratio of the vertical distances (2010\tfrac{\resid{20}}{\resid{10}}) with the ratio of the squared distances (202102\tfrac{\resid{20^2}}{\resid{10^2}}). (b) Ask which of the two points has the leverage to pull the fitted line toward itself.

(a) Because least-squares regression minimizes squared vertical distances, a point twice as far from the line (20\resid{20} units versus 10\resid{10} units) adds four times as much to the sum of squared residuals (202=400\resid{20^2} = \resid{400} versus 102=100\resid{10^2} = \resid{100}) and pulls twice as hard on the line. (Be careful not to say both are 22 times as large by forgetting to square the residual, or that the rubber band pulls 44 times as hard.) (b) (Don't assume that because Point Q started 20\resid{20} units off the trend, twice as far as Point P, its final residual on the plot will also be twice as large.) Because Point Q sits far from xˉ\fitted{\bar{x}}, it has high leverage and pulls the right end of the regression line sharply downward toward itself; once the line settles close to Point Q, Q's own residual looks small on the residual plot while the other points have larger residuals. The analyst should delete Point Q and re-run the regression without it to see if the slope and yy-intercept change noticeably.
5

A researcher plots daily coffee intake (x\datum{x}, in cups) against a blood biomarker (y\datum{y}) for 25 adults and obtains r=0.81r = 0.81 (r2=65.6%\rsq{r^2} = \rsq{65.6\%}). When she looks at the scatterplot, she sees 24 adults in a random, shapeless cloud between 0 and 3 cups per day, and a single adult at 10 cups per day with a very high biomarker value. (a) What will happen to rr and r2\rsq{r^2} if she removes the 10-cup adult, and why was rr so high with all 25 adults? (b) She verifies that the 10-cup adult's record is not a data-entry error or from a different population. What should she avoid doing, and what are the two valid ways to proceed?

(a) Picture where the regression rod points when it connects a round cloud on the left to one high point on the far right, versus when only the round cloud remains. (b) If a high-intake point is real data, what could it show about the shape of the relationship?

(a) Removing the 10-cup adult will cause rr and r2\rsq{r^2} to drop near 00. (Don't assume that removing an extreme point always increases r2\rsq{r^2}; here the remaining 24 points have no linear trend at all.) With all 25 adults included, that single high-leverage point in the top right tilted the regression seesaw to connect the shapeless cloud straight to itself, making it look like there is a strong linear trend. (b) She must not simply delete the point to make her regression look cleaner. Instead, she should either check whether the true relationship is curved (rising only at high coffee intake) and needs a log or power transformation, or, if a straight-line model is still used, report both regression fits: one with the 10-cup adult included and one without.