In short
The least-squares regression line minimises the sum of the squared residuals. Its slope is and it passes through , so . Interpret the slope as the predicted change in y for each 1-unit increase in x, and r² (the coefficient of determination) as the proportion of the variation in y explained by the linear relationship with x.
What you need to know
- Explain what makes the least-squares line 'best'.
- Calculate the slope and intercept from summary statistics.
- Interpret the slope, intercept and r² in context.
- Read the regression equation, s and r² from computer output.
Why 'least squares'?
Many lines could be drawn through a scatterplot. The least-squares line is the one that makes the sum of the squared residuals, Σ(y − ŷ)², as small as possible. Squaring stops positive and negative residuals cancelling and gives extra weight to large misses.
For the 10 students: x̄ = 4.2 hours, s_x = 2.30, ȳ = 65.2 points, s_y = 10.18, r = 0.952. Then b = 0.952 × 10.18/2.30 ≈ 4.21 points per hour and a = 65.2 − 4.21 × 4.2 ≈ 47.5, matching the line from topic 5.3. The line always passes through the point of means (4.2, 65.2).
Interpreting slope, intercept and r²
- Slope (4.21): for each additional hour studied, the predicted test score increases by about 4.21 points.
- Intercept (47.5): the predicted score for a student who studies 0 hours is 47.5 points (an extrapolation here, since the data start at 1 hour).
- r² (0.906): about 90.6% of the variation in test scores is explained by the linear relationship with hours studied.
- s (3.32): actual scores typically differ from predicted scores by about 3.3 points.
r² = (0.952)² ≈ 0.906. The remaining 9.4% of the variation in scores is due to other factors (prior knowledge, sleep, test-day nerves) and random variation.
Reading computer output
| Predictor | Coef | SE Coef | T | P |
|---|---|---|---|---|
| Constant | 47.500 | 2.278 | 20.85 | 0.000 |
| Hours | 4.214 | 0.4813 | 8.76 | 0.000 |
Below the table you'd see S = 3.32066, R-Sq = 90.6%. Read the equation from the Coef column: ŷ = 47.5 + 4.214x. The 'Constant' row is the intercept; the row named after the explanatory variable gives the slope.
The SE Coef, T and P columns relate to inference about the regression line, which is not part of the 2026–27 AP Statistics course. You only need the coefficients, S and R-Sq. Find r from R-Sq by taking the square root and giving it the sign of the slope: √0.906 ≈ +0.952.
Key terms
- Least-squares regression line
- The line that minimises the sum of squared residuals.
- Slope b
- The predicted change in y for a 1-unit increase in x; b = r·s_y/s_x.
- Coefficient of determination r²
- The proportion of the variation in y explained by the linear relationship with x.
- Point of means
- (x̄, ȳ), which always lies on the least-squares line.
Common mistakes
Interpreting the slope without 'predicted'.
'The predicted [y] increases by b [units] for each 1 [unit] increase in [x].'
Saying r² is the percentage of points on the line.
r² is the proportion of variation in y explained by the line.
Taking r = √r² without checking the sign.
r has the same sign as the slope.
How this topic is tested
- Write slope interpretations with 'predicted' and units.
- Read a and b from the Coef column of output.
- Interpret r² as 'the percentage of the variation in [y] explained by the linear relationship with [x]'.
Practice questions
Original AP-style multiple-choice questions. Pick an answer to see the explanation.
Question 1 · SP 3 · Analyze Data
r = 0.6, s_x = 5, s_y = 20. The slope of the least-squares line is:
Question 2 · SP 3 · Analyze Data
With b = 2.4, x̄ = 10 and ȳ = 50, the intercept is:
Question 3 · SP 4 · Interpret Results
A line predicting fuel cost (₹) from distance (km) has slope 6.5. The correct interpretation is:
Question 4 · SP 3 · Analyze Data
Output shows R-Sq = 64% and a negative slope. What is r?
Question 5 · SP 4 · Interpret Results
r² = 0.72 for a line predicting sales from advertising spend. The best interpretation is:
Free-response practice
Write your answer first, then mark it against the scoring guide.
Regression · 4 points
For 20 randomly selected flats in a city, the regression of monthly rent (₹ thousands) on floor area (m²) gives this output: Constant 4.2, Area 0.31; S = 2.6, R-Sq = 81%.
- (a) Write the equation, defining variables.
- (b) Interpret the slope.
- (c) Interpret R-Sq and find r.
Scoring guide: one point for each of the following
Part (a)
- rent-hat = 4.2 + 0.31(area), with rent in ₹ thousands per month and area in m².
Part (b)
- For each additional square metre of floor area, the predicted monthly rent increases by about ₹310 (0.31 thousand).
Part (c)
- About 81% of the variation in monthly rent is explained by the linear relationship with floor area.
- r = +√0.81 = 0.9, positive because the slope is positive.
Connected topics
Frequently asked questions
Does the least-squares line always pass through (x̄, ȳ)?
Yes, always. It's a quick check on any equation you compute by hand.
Will I need the T and P columns?
Not in the 2026–27 course; inference for the slope was removed. Read only the coefficients, S and R-Sq.
Is a high r² enough to trust the line?
No. Check the residual plot for patterns too.