Regression Word Problems

Solve complete regression problems: interpret slope and intercept in context, predict, spot extrapolation, compute residuals and read r and R².

Advanced30 minLesson

Definition

A regression word problem gives you real data (or a regression equation already fitted to it) and asks what the model says about the situation. Every such problem uses the same toolkit:
y^=mx+b\hat{y} = mx + b
  • **Slope mm in context**: for each increase of 1 unit in xx, the predicted yy changes by mm units, on average.
  • **Intercept bb in context**: the predicted yy when x=0x = 0. It only has a real meaning if x=0x = 0 makes sense and lies near the data.
  • Prediction: substitute xx into the equation to get the predicted value y^\hat{y}.
  • Interpolation vs extrapolation: a prediction for an xx inside the range of the data is interpolation (usually reliable); outside that range it is extrapolation (risky).
  • Residual: e=y−y^e = y - \hat{y} (actual minus predicted). Positive means the point lies above the line.
  • r and R²: rr gives the direction and strength of the linear relationship; R2=r2R^2 = r^2 is the share of the variation in yy that the linear relationship with xx explains.
A good answer always uses the units and words of the problem, not just numbers.

Try it now

The model y^=6x+48\hat{y} = 6x + 48 predicts a test score y^\hat{y} (points) from weekly study hours xx. What does the slope 66 mean?

Worked Examples

A café recorded the outdoor temperature xx (in °C, from 00 to 2020) and the number of hot drinks yy sold on five mornings. The regression line is y^=110−3x\hat{y} = 110 - 3x. Interpret the slope and the intercept.
1

Identify the slope and the intercept

y^=−3x+110\hat{y} = -3x + 110, so m=−3m = -3 and b=110b = 110 → m=−3m = -3, b=110b = 110
2

Interpret the slope with units

For each 1 °C warmer, the predicted number of hot drinks changes by −3-3 → About 3 fewer hot drinks per extra degree, on average
3

Interpret the intercept with units

At x=0x = 0 °C the model predicts y^=110−3×0=110\hat{y} = 110 - 3 \times 0 = 110 → About 110 hot drinks on a 0 °C morning
4

Check that the intercept makes sense

00 °C is a real temperature and it is inside the data range 00 to 2020 → The intercept has a real meaning here

Common Mistakes

Stating the slope as a bare number: "the slope is 6"

Why it's wrong: A number without context does not answer the question. The slope is a rate: it needs both units and the word "predicted" or "on average", because real points scatter around the line.

Correct: Say: "For each extra hour of study per week, the predicted test score rises by about 6 points."

Trusting a prediction far outside the data (extrapolation)

Why it's wrong: The line was fitted only to the observed range. Outside it the pattern may change, and the line can give impossible values like a score of 120 out of 100 or a negative number of sales.

Correct: Check the range of xx first. Inside it: interpolation. Outside it: extrapolation, so say the prediction is unreliable.

Computing the residual the wrong way round: y^−y\hat{y} - y

Why it's wrong: The sign then flips, and "above the line" becomes "below the line". By convention the residual is actual minus predicted.

Correct: Always use e=y−y^e = y - \hat{y}: positive means the model underpredicted, negative means it overpredicted.

Reading R2=0.9R^2 = 0.9 as "90% of the points lie on the line" or as "the model is right 90% of the time"

Why it's wrong: R2R^2 measures how much of the variation in yy the linear relationship explains. Points can all be off the line and R2R^2 can still be 0.9.

Correct: Say: "90% of the variation in yy is explained by the linear relationship with xx."

Interactive Visual

Scatter Plot

Weekly study hours and test score

0246405060708090Study hours per weekTest score (points)

ŷ = 6x + 48

r = 0.949 · strong positive correlation

Tap a point to see its coordinates.

Scatter Plot

Outdoor temperature and hot drinks sold

0510152025050100150Temperature (°C)Hot drinks sold

ŷ = −3x + 110

r = -0.949 · strong negative correlation

Tap a point to see its coordinates.

Interactive Sandbox

Expression Calculator

Try these:

History

No calculations yet

Practice Problems

18 problems
Problem 1 of 18
Easy
The model y^=6x+48\hat{y} = 6x + 48 predicts a test score y^\hat{y} (points) from weekly study hours xx. What does the slope 66 mean?

Why It Matters

Regression is how people turn data into decisions:
  • Shops and cafés predict how much stock to order from the weather forecast.
  • Schools look at how study time relates to results, and which students do better or worse than predicted.
  • Doctors and scientists use regression to estimate doses, growth rates and risks.
  • Car dealers and banks estimate how fast the value of a car drops each year.
In all of these, the hard part is not the arithmetic but the interpretation: saying what the slope means, knowing when a prediction can be trusted, and explaining how well the line fits. That is exactly what exams and real jobs ask for, and what this lesson trains.

Real World Applications

Biology Lab: Plant Growth

Biology students measure a seedling every week and fit a regression line to height against time to describe its growth rate.

Example:

For y^=2.5x+4\hat{y} = 2.5x + 4 (height in cm, xx in weeks, data from week 0 to week 8), the slope says the plant grows about 2.5 cm per week and the intercept says it was about 4 cm tall when measuring started.

1Try It Yourself

The class model is y^=2.5x+4\hat{y} = 2.5x + 4, with height y^\hat{y} in cm and time xx in weeks (data from week 0 to week 8).

What height does the model predict at week 6?

Step 1: Write the mathematical expression

Substitute x=6x = 6 into the equation:

Delivery Times for an Online Shop

Delivery companies model delivery time from distance to give customers an estimated arrival time and to spot routes that are slower than expected.

Example:

With y^=12+3x\hat{y} = 12 + 3x (minutes, xx = distance in km, data from 1 to 10 km), a 4 km delivery is predicted to take 12+12=2412 + 12 = 24 minutes.

2Try It Yourself

The model is y^=12+3x\hat{y} = 12 + 3x (time in minutes, xx = distance in km). A delivery of 6 km actually took 33 minutes.

What is the residual of this delivery?

Step 1: Write the mathematical expression

Residual = actual time minus predicted time:

Phone Battery Testing

Tech reviewers relate screen-on time to battery drain and report how strongly the two are linked, so readers know how much the regression line can be trusted.

Example:

If screen time and battery used have r=0.8r = 0.8, then R2=0.64R^2 = 0.64: 64% of the variation in battery use is explained by screen time.

3Try It Yourself

In a battery test the correlation between temperature of the room and battery life is r=−0.9r = -0.9.

What percentage of the variation in battery life is explained by the linear relationship with room temperature?

Step 1: Write the mathematical expression

Square r and turn it into a percentage:

Key Takeaways

  • 1Interpret the slope as a rate with units: for each 1-unit increase in xx, the predicted yy changes by mm, on average
  • 2The intercept is the predicted yy at x=0x = 0; it only means something if x=0x = 0 makes sense and is near the data
  • 3Predict by substituting xx into y^=mx+b\hat{y} = mx + b; inside the data range this is interpolation, outside it is risky extrapolation
  • 4A residual is actual minus predicted, e=y−y^e = y - \hat{y}: positive above the line, negative below it
  • 5rr shows direction and strength; R2=r2R^2 = r^2 is the share of the variation in yy explained by the line
  • 6A strong fit shows a link, not a cause: always answer in the words and units of the problem

Frequently Asked Questions

No. It is the predicted yy at x=0x = 0. If x=0x = 0 is impossible (a person 0 cm tall) or far from the data (a house with 0 m²), the intercept is only a number that positions the line, not something to interpret.
No. It is the predicted yy at x=0x = 0. If x=0x = 0 is impossible (a person 0 cm tall) or far from the data (a house with 0 m²), the intercept is only a number that positions the line, not something to interpret.
There is no safe distance. A little outside the range may still be fine if the pattern clearly continues, but any extrapolation should be flagged as uncertain, and predictions far away (or impossible values) should not be used.
rr is between −1-1 and 11 and shows the direction (sign) and strength of a linear relationship. R2=r2R^2 = r^2 is between 00 and 11 and tells you what share of the variation in yy the line explains. R2R^2 loses the sign, so check the slope for the direction.
Not necessarily. A high R2R^2 only says the line fits the data well. A third variable or chance can create the pattern; only a controlled experiment can show cause and effect.

Glossary

Predicted value y^\hat{y}
The value of yy that the regression line gives for a chosen xx
Slope in context
The predicted change in yy, in the units of yy, for each 1-unit increase in xx
Intercept in context
The predicted value of yy when x=0x = 0, meaningful only if x=0x = 0 is realistic and near the data
Interpolation
Predicting yy for an xx inside the range of the data
Extrapolation
Predicting yy for an xx outside the range of the data; often unreliable
Coefficient of determination R²
The share of the variation in yy explained by the linear relationship with xx; equals r2r^2 for a line

Formula Card

Regression line

y^=mx+b\hat{y} = mx + b

Substitute x to get the predicted value

Least-squares slope

m=∑(x−xˉ)(y−yˉ)∑(x−xˉ)2m = \frac{\sum(x-\bar{x})(y-\bar{y})}{\sum(x-\bar{x})^2}

Computed from the deviations from the means

Least-squares intercept

b=yˉ−mxˉb = \bar{y} - m\bar{x}

The line always passes through the point of means

Residual

e=y−y^e = y - \hat{y}

Actual minus predicted; positive above the line

Coefficient of determination

R2=r2=1−SSresSStotR^2 = r^2 = 1 - \frac{SS_{\text{res}}}{SS_{\text{tot}}}

$SS_{\text{res}}$ is the sum of squared residuals, $SS_{\text{tot}}$ the sum of squared deviations of y from its mean

Today's challengeOne problem, three tries

More in This Topic