In short
A regression line models how a response variable y changes as an explanatory variable x changes: , where ŷ (y-hat) is the predicted value of y, a is the y-intercept and b is the slope. Use it to predict y for a given x. Predictions are reasonable only within the range of the x-values used to fit the line; predicting outside it is extrapolation and often unreliable.
What you need to know
- Write and read a regression equation ŷ = a + bx with variables defined in context.
- Use a regression line to make predictions.
- Distinguish between an observed value y and a predicted value ŷ.
- Explain the dangers of extrapolation.
The regression equation
For the 10 students in topic 5.1, technology gives the line
The hat on ŷ means predicted. Writing 'score = 47.5 + 4.21(hours)' without the hat claims every student's score lies exactly on the line, which is false. Always define the variables in words.
Making predictions
Predict the score of a student who studies 5 hours: ŷ = 47.5 + 4.21(5) ≈ 68.6. A student who studied 5 hours in our data actually scored 66, so the line over-predicted for that student by about 2.6 points. Topic 5.4 calls this difference a residual.
A prediction is an estimate of the average score for students who study that many hours. Individual students will vary around it.
Extrapolation
The data cover 1 to 8 hours. Predicting for 20 hours gives ŷ = 47.5 + 4.21(20) ≈ 131.8 — impossible on a test out of 100. The linear pattern may not continue beyond the data: scores level off near the maximum, and very long study sessions might even hurt through tiredness.
Extrapolation means predicting for x values outside the range of the data used to fit the line. The further outside, the less we can trust the prediction. Predictions for x inside the range (interpolation) are more reliable, provided the pattern is linear.
Similarly, the intercept a = 47.5 is the predicted score for 0 hours of study. Zero is just outside our data (the smallest value is 1 hour), so even this prediction needs caution. Sometimes the intercept has no sensible meaning at all, such as the predicted weight of a baby at age 0 days from data on children aged 2 to 10.
Key terms
- Regression line
- A line ŷ = a + bx that describes how y changes with x and is used for prediction.
- ŷ (y-hat)
- The predicted value of the response for a given x.
- Extrapolation
- Using a regression line to predict outside the range of the x data; often unreliable.
- y-intercept a
- The predicted value of y when x = 0.
Common mistakes
Writing y = 47.5 + 4.21x.
Use ŷ (predicted) and define the variables in words.
Treating a prediction as exact for an individual.
It is a typical (average) value; individuals vary.
Predicting far outside the data without comment.
Note that it's extrapolation and may be unreliable.
How this topic is tested
- Define x and y in context with the equation.
- Show the substitution when you predict.
- Check the range of x before trusting a prediction.
Practice questions
Original AP-style multiple-choice questions. Pick an answer to see the explanation.
Question 1 · SP 3 · Analyze Data
Using ŷ = 47.5 + 4.21x (x = hours studied), what is the predicted score for 3 hours?
Question 2 · SP 4 · Interpret Results
A line predicting weight (kg) from height (cm) was built from adults 150–190 cm tall. Predicting the weight of a 100 cm child is:
Question 3 · SP 3 · Analyze Data
What does the hat in ŷ indicate?
Question 4 · SP 4 · Interpret Results
A student who studied 4 hours scored 70. The line predicts 64.4. Which is true?
Question 5 · SP 4 · Interpret Results
A regression of fuel used (litres) on distance (km) gives an intercept of 0.3 litres. What does it mean?
Free-response practice
Write your answer first, then mark it against the scoring guide.
Regression · 4 points
For 30 used cars of one model aged 1 to 10 years, the regression line is price-hat = 9.8 − 0.72(age), with price in lakh rupees and age in years.
- (a) Predict the price of a 6-year-old car.
- (b) A 6-year-old car sold for 6.1 lakh. Did the line over- or under-predict? Explain.
- (c) Would you trust the line to predict the price of a 15-year-old car? Explain.
Scoring guide: one point for each of the following
Part (a)
- price-hat = 9.8 − 0.72(6) = 5.48 lakh rupees.
Part (b)
- Under-predicted, because the actual 6.1 is greater than the predicted 5.48.
Part (c)
- No: 15 years is outside the 1–10 year range (extrapolation),
- and the line predicts 9.8 − 10.8 = −1.0 lakh, an impossible negative price.
Connected topics
Frequently asked questions
How is the line chosen?
By least squares, which makes the sum of squared vertical distances from the points as small as possible (topic 5.5).
Can I predict x from y with the same line?
No. The line is built to predict y from x; predicting x needs a different regression.
Is interpolation always safe?
Safer, but only if the relationship is linear across the range.