Back to Lesson

Teacher Guide: Making Predictions from Data

Use a regression line to predict values, work backwards to a target, and judge when a prediction can be trusted.

Use this lesson with your class

Free, no student accounts needed.

Share with students

Students open the lesson and practise with instant feedback.

Printable worksheet

All practice problems on paper, with a separate answer key.

Class quiz

10 questions on Regression. Students join with a name, you see everyone's score.

For Teachers

Learning Objectives
  • Substitute an x-value into a regression equation to calculate a predicted value
  • Solve a regression equation for x to find the input that gives a target value
  • Distinguish interpolation from extrapolation and explain why extrapolation is risky
  • Round predictions to a precision and direction that fit the context
  • Judge the reliability of a prediction from the strength of the correlation
Prerequisites
  • • Introduction to Regression: the line of best fit y=mx+by = mx + b
  • • Linear Regression: slope and intercept of a regression line
  • • Correlation Coefficient: reading rr as strong, moderate or weak
  • • Interpreting Data and Making Predictions: general trends in data
  • • Solving two-step linear equations
Discussion Starters
  • 1. A line predicts a score of 112 out of 100. What went wrong, and how could you have spotted it before calculating?
  • 2. When should a prediction be rounded up rather than to the nearest whole number?
  • 3. Two lines give predictions with the same method. Why can one be trusted much more than the other?
  • 4. Weather forecasts are less accurate for next week than for tomorrow. How is that like extrapolation?
Common Misconceptions

A predicted value is what will definitely happen

Remediation: Show the scatter plot: real points lie above and below the line. Compare the prediction for 7 hours with the actual scores of 62 and 88 in the weak data set.

If the equation gives a number, the number must make sense

Remediation: Let students extrapolate on purpose (12 hours of study, 15 hours of battery) and check the answers against reality: 112 points, -20%.

To find x for a target, plug the target into x

Remediation: Ask first: is the given number an x-value or a y-value? Label the units (hours or points) before writing the equation.

Differentiation Ideas

For Struggling Students:

  • • Use whole-number slopes and intercepts first
  • • Give a table with the data range written at the top of each problem
  • • Practice only predicting y from x before solving for x

For On-Level Students:

  • • Mix prediction and solving-for-x questions with decimal slopes
  • • Classify each prediction as interpolation or extrapolation
  • • Decide the rounding direction from the context

For Advanced Students:

  • • Compare predictions from a strong and a weak data set and explain the difference using r
  • • Find the x-value where a model gives an impossible result (battery at 0%, score at 100)
  • • Research a real forecast and discuss how far it extrapolates
Standards Alignment
  • 8.SP.A.3 (CCSS.MATH.CONTENT.8.SP.A.3)

    Use the equation of a linear model to solve problems in the context of bivariate measurement data, interpreting the slope and intercept

  • HSS.ID.B.6.A (CCSS.MATH.CONTENT.HSS.ID.B.6.A)

    Fit a function to the data; use functions fitted to data to solve problems in the context of the data

  • HSS.ID.C.8 (CCSS.MATH.CONTENT.HSS.ID.C.8)

    Compute (using technology) and interpret the correlation coefficient of a linear fit

Lesson Resources
  • visualPrediction Slider

    Students move x along the regression line and watch the prediction and the distance outside the data range change

  • activityPredict, Then Check

    Students predict values from a class data set, then compare them with real measurements for strong and weak data

  • worksheetInterpolation or Extrapolation?

    Mixed practice: predict, solve for x, classify each prediction and round in context

Lesson Content

Everything students see: definition, examples, common mistakes, applications. Tap to open.

Definition

Once you have a regression line y^=mx+b\hat{y} = mx + b, you can use it to make predictions. The symbol y^\hat{y} (read "y-hat") is the predicted value: the value the line expects, not a measured one.
There are two kinds of questions:
  • **Predict yy from xx**: substitute the xx-value and calculate y^=mx+b\hat{y} = mx + b.
  • **Find xx for a target yy**: set mx+bmx + b equal to the target and solve: x=y−bmx = \frac{y - b}{m}.
Where the xx-value lies matters:
  • Interpolation: xx is inside the range of the data. The prediction is usually reasonable.
  • Extrapolation: xx is outside the range of the data. The pattern may not continue, so the prediction is risky.
How much you can trust a prediction depends on the strength of the correlation: when rr is close to 11 or −1-1, the points hug the line and predictions are reliable; when rr is close to 00, they are only rough guesses.

Worked Examples

A class recorded hours studied (xx, from 1 to 8 hours) and test scores (yy, out of 100). The regression line is y^=5x+52\hat{y} = 5x + 52. Predict the score of a student who studies 6.56.5 hours.
1

Check where the x-value lies

The data goes from 11 to 88 hours, and 1≤6.5≤81 \le 6.5 \le 8 → Inside the data: interpolation
2

Substitute x = 6.5 into the equation

y^=5(6.5)+52\hat{y} = 5(6.5) + 52 → y^=5×6.5+52\hat{y} = 5 \times 6.5 + 52
3

Multiply

5×6.5=32.55 \times 6.5 = 32.5
4

Add the intercept

32.5+52=84.532.5 + 52 = 84.5 → y^=84.5\hat{y} = 84.5

Common Mistakes

Putting the target y-value in place of x: for a target score of 8080, calculating 5(80)+52=4525(80) + 52 = 452

Why it's wrong: 8080 is a score, so it is a yy-value. Substituting it for xx answers a different question (the score after 80 hours of study).

Correct: Set the equation equal to the target and solve for xx: 80=5x+5280 = 5x + 52, so x=5.6x = 5.6.

Trusting extrapolation: predicting 112112 points for 1212 hours of study

Why it's wrong: The pattern was only observed from 1 to 8 hours. Outside that range it can change, and here the score cannot even go above 100.

Correct: Always check the data range first. Mark predictions outside it as extrapolation and treat them with caution.

Rounding without thinking about the situation: reporting 84.584.5 points as exact, or rounding 5.65.6 hours down to 55

Why it's wrong: A prediction is an estimate, so extra decimals suggest more precision than it has. Rounding down a target can leave you short (5 hours predicts only 77 points).

Correct: Round to the precision of the data, and round up when you have to reach a goal or cover everyone (time, chairs, buses).

Treating every prediction as equally reliable

Why it's wrong: A line can always be calculated, even for scattered data. With r≈0.21r \approx 0.21 the actual values can be far from y^\hat{y}.

Correct: Look at the scatter plot or rr first: ∣r∣|r| close to 1 means a reliable prediction, ∣r∣|r| close to 0 means only a rough guess.

Why It Matters

Predictions are the main reason people fit a line to data in the first place:
  • Planning: A school fair predicts how many visitors to expect, so it knows how many chairs to set out.
  • Health: Doctors compare a child's height with growth models to see whether growth is on track.
  • Delivery apps: Apps estimate how long your order will take from the distance to the restaurant.
  • Batteries: Phones estimate how many hours of battery are left from how fast it is draining.
A prediction is only useful if you also know how far to trust it. Knowing the difference between interpolation and extrapolation, rounding sensibly and checking the correlation stops you from believing numbers like a test score of 112 out of 100.

Real World Applications

Child Growth Charts

Doctors compare a child's height with growth models. A simple model for ages 2 to 10 is $\hat{y} = 6x + 77$, where $x$ is age in years and $\hat{y}$ is height in cm. The model only works for those ages: for an adult of 40 it would predict $317$ cm.

Example:

At age 5 the model predicts 6(5)+77=1076(5) + 77 = 107 cm.

1Try It Yourself

A growth model for ages 2 to 10 is y^=6x+77\hat{y} = 6x + 77 (height in cm, age xx in years).

What height does the model predict for an 8-year-old?

Step 1: Write the mathematical expression

Substitute x=8x = 8:

Delivery Time Estimates

Food delivery apps fit lines to past orders to estimate delivery times. One app found $\hat{y} = 3x + 8$, where $x$ is the distance in km (orders from 1 to 12 km) and $\hat{y}$ is the time in minutes.

Example:

For a restaurant 5 km away the app predicts 3(5)+8=233(5) + 8 = 23 minutes.

2Try It Yourself

The delivery model is y^=3x+8\hat{y} = 3x + 8 (minutes, distance xx in km, data from 1 to 12 km). The app wants to promise delivery in 35 minutes.

Up to what distance in km can the app make that promise?

Step 1: Write the mathematical expression

Solve 35=3x+835 = 3x + 8 for xx:

Phone Battery Forecasts

Phones estimate the remaining battery from how fast it is draining. Measurements while streaming video gave $\hat{y} = 100 - 8x$, where $x$ is hours of video (data from 0 to 10 hours) and $\hat{y}$ is the battery level in percent.

Example:

After 6 hours of video the model predicts 100−8(6)=52%100 - 8(6) = 52\%.

3Try It Yourself

The battery model is y^=100−8x\hat{y} = 100 - 8x (percent, xx in hours, data from 0 to 10 hours). Someone asks what the battery will show after 15 hours of video.

What value does the model predict for 15 hours?

Step 1: Write the mathematical expression

Substitute x=15x = 15:

Key Takeaways

  • 1To predict yy, substitute xx into y^=mx+b\hat{y} = mx + b; y^\hat{y} is a predicted value, not a measured one
  • 2To find the xx for a target yy, set mx+bmx + b equal to the target and solve: x=y−bmx = \frac{y - b}{m}
  • 3Interpolation predicts inside the data range and is usually reasonable
  • 4Extrapolation predicts outside the data range and is risky: it can even give impossible values
  • 5Round predictions to a sensible precision, and round up when you must reach a goal or cover everyone
  • 6Predictions are reliable when ∣r∣|r| is close to 1 and only rough guesses when rr is close to 0

Frequently Asked Questions

Why do we write y^\hat{y} instead of yy?

The hat shows that the value comes from the line and is a prediction. The real, measured value is yy. Keeping them apart reminds you that a real result can be above or below the prediction.

Is extrapolation always wrong?

Not always. A little outside the data (for example x=0x = 0 or x=9x = 9 when the data goes from 1 to 8) can still be a fair estimate. The further you go, the more likely the pattern changes, so say clearly that you are extrapolating.

How close to 1 must rr be for a good prediction?

A common rule of thumb: ∣r∣≥0.7|r| \ge 0.7 is strong, 0.40.4 to 0.70.7 is moderate and below 0.40.4 is weak. Even with a strong correlation, a single prediction can be a few points off.

Can I use the same line to predict xx from yy?

Solving y=mx+by = mx + b for xx gives a good estimate for planning, as in the study-hours example. Statisticians fitting a model only to predict xx would calculate a separate line with xx as the response variable, so treat the answer as an estimate.

Glossary

Predicted value y^\hat{y}
The value of yy that the regression line gives for a chosen xx
Data range
The interval from the smallest to the largest xx-value in the data
Interpolation
Predicting for an xx-value inside the data range
Extrapolation
Predicting for an xx-value outside the data range; risky because the pattern may change
Explanatory variable
The variable xx used to make the prediction (for example hours studied)
Response variable
The variable yy being predicted (for example the test score)

Formula Card

Predict y from x

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

Substitute the x-value and calculate

Find x for a target y

x=y−bmx = \frac{y - b}{m}

Subtract the intercept, then divide by the slope

Interpolation check

xmin⁡≤x≤xmax⁡x_{\min} \le x \le x_{\max}

If x is inside the data range, the prediction is interpolation; otherwise it is extrapolation

More in This Topic