Priority labels: ImportantNeutralLess important show where to spend revision time.
From a fitted line to a population modelImportant
Chapter 8 described the sample. To generalise, we posit a population model in which, at each x, the responses scatter around a true mean line:
| Symbol | Meaning | Estimated by |
|---|---|---|
| β₀, β₁ | population intercept and slope | b₀, b₁ |
| ε | random error of one observation | residual e = y − ŷ |
| σ | spread of the errors around the line | s_e |
The divisor n − 2 reflects the two estimated parameters. s_e is the typical size of a residual in y's own units (the TI-84 labels it s; R calls it the "residual standard error"). Smaller s_e means a tighter fit.
The LINE conditionsImportant
| Assumption | How to check | |
|---|---|---|
| L | Linearity: the true relation is straight | Scatterplot; residual plot without curvature |
| I | Independent errors | Data collection; residuals against time or order |
| N | Nearly Normal errors | Histogram or Normal probability plot of the residuals |
| E | Equal spread at all x | Residuals against fitted values: a band, not a fan |
Check in the order L → I → E → N and stop to rethink if an early one fails. Chapter 10 shows what to do when conditions break.
The standard error of the slopeImportant
The slope b₁ changes from sample to sample. Its precision improves with less scatter around the line (small s_e), more spread in x (large s_x) and more data (large n):
Testing the slopeImportant
H₀: β₁ = 0 (no linear association) against β₁ ≠ 0 (or a one-sided alternative). If β₁ = 0 the best prediction is ȳ whatever x is, so x carries no linear information.
- The test of β₁ = 0 is equivalent to the test of ρ = 0 for the population correlation.
- Software gives the two-sided p-value. For a one-sided alternative, halve it — but only if b₁ has the sign the alternative predicts.
Interval for the slopeImportant
Read it as: "we are C% confident that each extra unit of x goes with a true mean change in y between these limits." An interval that excludes 0 agrees with a significant two-sided test.
Does advertising pay? (data from chapter 8)
For the 8 weeks of spend and sales, b₁ = 2.083, s_e = 1.448 and s_x = 2.449. Test H₀: β₁ = 0 and build a 95% interval.
Standard error of the slope
Test statistic
Interval
Strong evidence of a positive linear relation: each extra €1,000 of spend goes with roughly €1,540–€2,630 more weekly sales (95% confidence). Eight points is a small sample, so check the residuals before trusting this.
Predictions: two different questionsImportant
For a new value x_v the point prediction is ŷ_v = b₀ + b₁x_v. The uncertainty depends on what you ask:
| CI for the mean response μ_v | Prediction interval for one new y_v | |
|---|---|---|
| Question | Where does the mean response of every unit at x = x_v sit? | Where will a single new unit with x = x_v fall? |
| SE² | SE²(b₁)(x_v − x̄)² + s_e²/n | SE²(b₁)(x_v − x̄)² + s_e²/n + s_e² |
| Width | Narrower | Always wider (adds individual scatter) |
| Normality | Helped by the CLT for large n | Needs Normal errors; the CLT does not rescue it |
Both bands widen as x_v moves away from x̄ — hence the bow-tie shape around the line — and are narrowest at x̄.
Spending 5.5 k€
Point prediction
Mean response
Single week
The average sales at a 5.5 k€ budget are pinned down to about ±1.4; a particular week could land anywhere from roughly 17.4 to 25.0.
Reading regression outputImportant
| TI-84 LinRegTTest | R summary(lm) | Meaning |
|---|---|---|
| a | (Intercept) Estimate | b₀ |
| b | x Estimate | b₁ |
| t, p | t value, Pr(>|t|) | test of β₁ = 0 (two-sided) |
| df | degrees of freedom | n − 2 |
| s | Residual standard error | s_e |
| r², r | Multiple R-squared | R², r |
The calculator does not print SE(b₁); recover it as b/t. It has no built-in command for prediction intervals, so combine the formulas above with invT. R gives everything:
PitfallsImportant
| Pitfall | Consequence |
|---|---|
| No scatterplot | Curvature, clusters and outliers go unnoticed |
| Quoting r or R² without the plot | Can hide outliers and non-linearity |
| One-sided p taken straight from software | Output is two-sided; halve it after checking the sign |
| Confusing the CI for the mean with a prediction interval | Answers the wrong question |
| Extrapolating | Unreliable, and the intervals understate the risk |
| Causal wording from observational data | Confounding may explain the slope |
Key takeaways
- Slope inference uses t with n − 2 df: t = b₁/SE(b₁), SE(b₁) = s_e / (s_x√(n−1)).
- Check L, I, E, N (in that order) before trusting any p-value or interval.
- CI for a mean response is narrower than a prediction interval for one case; both bow outward away from x̄.