You can predict with a regression line and check it with residuals. Two questions remain. Which line, out of all the lines you could draw, should be used? And once you have it, how well does it do? This topic answers both, and then looks at the points that can change the answers.
The least-squares line
Every line through a scatterplot leaves residuals, some positive and some negative. Adding them up is useless, because they cancel. Squaring them first makes every miss count, and big misses count a lot. The least-squares regression line is the line that makes
as small as possible. Exactly one line does that, and technology finds it. Its slope and intercept have simple formulas in terms of summary statistics:
Two facts follow. The line always passes through the point of means, . And in standard deviation units, an that is one SD above gets a prediction only SDs above : predictions are pulled toward the mean unless . (The reference sheet gives but not the slope formula, so learn as a relationship.)
Worked example 1. For ten basketball players, practice hours have , ; free throw percentages have , ; and . Find the least-squares line.
Slope:
Intercept:
Line: . For each additional hour of practice a week, the predicted free throw percentage increases by about 2.9 percentage points.
How well does the line fit? and
The coefficient of determination, , compares the scatter around the line with the scatter around . It is the fraction of the variation in that the line accounts for. Interpret it with this template:
"About [ as a percent] of the variation in [] is accounted for by the linear model using []."
The standard deviation of the residuals, , is the typical size of a prediction error, in the units of :
"The actual [] typically differs from the predicted [] by about [units]."
Worked example 2. A magazine regresses fuel economy (mpg) on weight (thousands of pounds) for 30 car models. The output shows Constant 48.7, Weight , S = 2.81 and R-Sq = 76.4%.
Line:
Slope: for each additional 1,000 pounds, the predicted fuel economy decreases by about 6.25 mpg.
: about 76.4% of the variation in fuel economy is accounted for by the linear model using weight.
: a car's actual fuel economy typically differs from its predicted fuel economy by about 2.81 mpg.
: , negative because the slope is negative.
Reading output: the "Constant" row is the intercept , the row named for the explanatory variable is the slope , "S" is and "R-Sq" is . Output may show other columns; this course needs only these.
Unusual points
| Kind of point | What it is | Typical effect |
|---|---|---|
| Outlier | a large residual: far above or below the line | raises , lowers and |
| High-leverage point | an value far from | can pull the line toward itself |
| Influential point | removing it changes the slope or intercept a lot | often a high-leverage point |
Because squares make far-off points count heavily, the least-squares line, like the mean, is not resistant. The figure shows the ten players plus an eleventh who practices 16 hours a week and makes 58%. With all eleven, the slope is 0.49 and . Without the eleventh, the slope is 2.92 and . That single high-leverage point is influential: it hides a strong linear association among everyone else.
A point near with an unusual behaves differently. It has a large residual, so it raises and lowers , but it has little leverage, so the slope barely moves.
What to do with unusual points: look for a reason, then report the analysis with and without them. Never delete a point just because it does not fit.