Priority labels: ImportantNeutralLess important show where to spend revision time.
Where this chapter fitsNeutral
Chapter 8 described a line, chapter 9 made inference on it, and this chapter asks what if the conditions are not true? The answer lives in the residuals. Skepticism is the point: plot the residuals, look for the story they tell, and decide whether to refine, split or transform before reporting anything.
Subgroups hiding in the residualsImportant
A residual plot can reveal clusters that behave differently — two product lines, two regions, before and after a policy. When the data are really several populations pooled together, one common line misleads. Look for subgroups, and consider fitting separate models when it makes substantive sense. Identifying the groups often explains the data better than the model does.
ExtrapolationNeutral
Prediction outside the observed x range assumes the straight-line story continues. The further x_v is from x̄, the less certain ŷ is; with time as x, forecasting far ahead is especially risky. In the sales example, a 10 k€ budget (the data stop at 8) gives ŷ ≈ 30.6, but nothing in the data says returns do not flatten out beyond 8.
Unusual points: outlier, leverage, influenceImportant
| Term | Meaning (as defined in this course) | Typical diagnostic |
|---|---|---|
| Outlier | Large residual: far from the line vertically | Residual plot |
| High-leverage point | Extreme x: far from x̄ horizontally | Scatterplot |
| Influential point | Removing it changes the line, mainly the slope b₁, noticeably | Refit with and without it |
- An outlier or a leverage point may or may not be influential.
- A point that is both high-leverage and off the trend is typically influential.
- Influential points can hide: because they pull the line towards themselves, their residuals may look small. Use the scatterplot, not just the residual plot, to find leverage.
- Even a non-influential outlier or leverage point can alter r and R².
- Cook's distance combines leverage and residual size into one flag (values above 1, or above 4/n as a stricter rule, deserve a look).
| Location of the point | Leverage | Residual | Influential? |
|---|---|---|---|
| Off the line, x near x̄ | Low | Large | Rarely |
| On the line, x far from x̄ | High | Small | Rarely (it may even improve the fit) |
| Off the line, x far from x̄ | High | Large (or deceptively moderate) | Yes, strongly |
What to do: never delete silently. Report the model with and without the point, investigate whether it is an error, and note when a leverage point is a sign that the relationship is really non-linear. The regression lab lets you drag an extra point around and watch b₁, r and R² respond.
Working with summary valuesNeutral
Averages (monthly means, city means) vary less than the raw observations they summarise. A regression on summaries therefore shows less scatter, a higher r and R² and apparent certainty that the individual-level data would not support. Be suspicious of such results; where possible work with the underlying cases.
Autocorrelation and the Durbin–Watson testImportant
In time-ordered data, neighbouring errors are often related (first-order autocorrelation: adjacent values; second-order: every other one). That breaks the independence condition and makes standard errors and p-values unreliable. Plot the residuals in time order, then quantify the problem with the Durbin–Watson statistic:
| D close to | Meaning |
|---|---|
| 2 | No autocorrelation |
| Below 2 | Positive autocorrelation (neighbours move together) |
| Above 2 | Negative autocorrelation (neighbours alternate) |
Compare D with the table values d_L and d_U, which depend on n and the number of predictors k (here always 1). Positive autocorrelation: D < d_L → evidence; d_L ≤ D ≤ d_U → inconclusive; D > d_U → no evidence. For negative autocorrelation use 4 − D (equivalently D > 4 − d_L → evidence).
Computing D by hand
Eight residuals in time order: 1.2, 0.9, 0.5, −0.2, −0.8, −1.1, −0.6, 0.1.
Numerator: squared successive changes
Denominator: squared residuals
Statistic
D is far below 2, which signals strong positive autocorrelation: the residuals drift in long runs rather than jumping randomly. Slope tests from this model would not be trustworthy.
Remedies: model the errors with time-series methods, find a predictor that explains the time pattern, or sample the series at wider intervals so values are further apart in time (this helps first-order dependence but not necessarily higher orders).
Re-expressing the dataImportant
No rule says x and y must be used in their raw units. A transformation can reach four goals: make a skewed variable more symmetric, make the spread of several groups alike, straighten a curved scatterplot, and make the scatter even across x instead of fanning out. After transforming, recheck the conditions on the new scale.
| Model on the transformed scale | Typical situation |
|---|---|
| log(y) against x | y grows by a roughly constant percentage per unit of x; fan-shaped residuals |
| y against log(x) | y keeps growing but with diminishing returns |
| log(y) against log(x) | power-law relation; both variables right-skewed |
| −1/y against x | an upward bend in negatively correlated data |
The ladder of powers
A convenient ordered menu: x², x (no change), √x, log x, −1/√x, −1/x. Moving down the ladder pulls in a long right tail and bends upward-curving scatterplots towards straight; moving up does the opposite. Try a step, recheck the plot, and repeat. In the lab, load the "curved" data set and watch the residual pattern disappear after taking logs.
Regression sanity routineImportant
- Scatterplot: form, outliers, groups, equal spread.
- Fit the line and save residuals.
- Residuals against order (time) → independence.
- Residuals against fitted values → linearity and equal variance.
- Histogram or Normal plot of residuals → Normality (only after 1–4 pass).
- Re-fit without influential points; compare slopes.
- Transform if needed and repeat; state the final model with its limits.
On the TI-84 LinRegTTest stores the residuals in the list RESID; plot them against L1 (or a 1,2,3… index list) with STAT PLOT. There is no Durbin–Watson or Cook's-distance command, so compute D by hand and judge influence by refitting.
Key takeaways
- Outlier = large residual; leverage = extreme x; influential = changes the slope when removed. Leverage points can hide in residual plots.
- Autocorrelation violates independence; D ≈ 2 is fine, D well below 2 means positive autocorrelation.
- Transform (log, roots, reciprocals) to straighten, equalise spread or symmetrise — then recheck everything.