Chapter 14 Ā· Statistics and data analysis

Making and Checking Predictions with Linear Models

Use a linear model to predict values, check whether each prediction is supported by the data and possible in context, and find and fix mistakes in how a model is read.

20 min read

A linear model is the equation of a straight line that someone chose because the line stays close to a set of data. It sums up the overall pattern, or trend, in that data. A prediction is the value the model gives when you put in a value you choose.

In this lesson you will use a model to make predictions, decide which predictions deserve your trust, and catch mistakes in how a model is read.

Keep one fact in mind from the start. The line was chosen for closeness to the data. It does not have to pass through every data point, so a prediction is an estimate, not a guarantee.

One situation runs through the whole lesson. Eight students each reported how long they studied for a science test worth 100 points. A classmate chose a linear model for their results. Before you see it, here is what each letter means.

  • xx is the study time, in hours.
  • yy is the score the model gives, in points.
  • The reported study times run from 0 hours to 6 hours. So 0≤x≤60 \le x \le 6 is the data range: the xx-values that the data actually cover.
  • A real score on this test is from 0 to 100 points.
y=6x+52y = 6x + 52
Actual scores compared with the model's values
Study time x (hours)Actual score (points)Model value 6x + 52 (points)Actual minus model (points)
00
5454
5252
+2+2
11
5555
5858
āˆ’3-3
22
6666
6464
+2+2
2.52.5
6868
6767
+1+1
33
6767
7070
āˆ’3-3
44
7878
7676
+2+2
55
8181
8282
āˆ’1-1
66
9090
8888
+2+2

Read across any row. The model's value is close to the actual score, but the two are not equal. In this table they differ by 1 to 3 points. The actual score is above the model's value for five students and below it for three. Seeing some scores above and some below is a rough sign that a line is close. It is not a rule, and the two counts do not have to match.

How close the line stays to the data is called the model's fit. You judge fit by closeness to the data as a whole, not by whether the line hits each data point. So keep two ideas apart:

  • The equation is exact. For x=4x = 4 it gives exactly 6(4)+52=766(4) + 52 = 76.
  • The match to real scores is approximate. The student who studied 4 hours scored 78.

To predict, put a study time in hours in place of xx and work out yy. Then state the result with the word about.

Worked example

Predict a score from a study time

A student plans to study for 3.5 hours. Use the model y=6x+52y = 6x + 52 to predict the student's score.

  1. Decide which letter the given number replaces. 3.5 is a study time in hours, and x stands for study time in hours. The units match, so 3.5 goes in for x.

    x=3.5x = 3.5
  2. Substitute 3.5 for x. The equation gives the model's score for any study time, so this gives the model's score for 3.5 hours.

    y=6(3.5)+52y = 6(3.5) + 52
  3. Multiply first, because multiplication comes before addition. A rate of 6 points per hour for 3.5 hours makes 21 points: 6 times 3 is 18, and 6 times 0.5 is 3.

    6(3.5)=18+3=216(3.5) = 18 + 3 = 21
  4. Add the 52 points that the model gives for 0 hours of study.

    y=21+52=73y = 21 + 52 = 73
  5. Say what the number means. The model's value is exactly 73, but a real score is only expected to land near it, so report an estimate.

Answer

The model predicts a score of about 73 points for 3.5 hours of study.

Worked example

Find the study time that goes with a score

According to the model y=6x+52y = 6x + 52, what study time goes with a score of 85 points?

  1. This time you know the score and want the study time. 85 is a score in points, and y stands for the model's score, so 85 replaces y. The unknown is x.

    85=6x+5285 = 6x + 52
  2. Subtract 52 from both sides. Taking the same number away from both sides keeps them equal, and it leaves the term with x alone on the right.

    85āˆ’52=6x+52āˆ’52⟹33=6x85 - 52 = 6x + 52 - 52 \quad\Longrightarrow\quad 33 = 6x
  3. Divide both sides by 6. You may do this because 6 is not zero, and dividing both sides by the same nonzero number keeps them equal.

    336=6x6⟹5.5=x\frac{33}{6} = \frac{6x}{6} \quad\Longrightarrow\quad 5.5 = x
  4. Check by putting 5.5 back into the model. The result should be 85 again.

    6(5.5)+52=33+52=856(5.5) + 52 = 33 + 52 = 85
  5. Say what the result means. The model's line reaches 85 points at 5.5 hours. This is an estimate from the trend in the data. It is not a promise that 5.5 hours of study produces a score of 85.

Answer

According to the model, a score of 85 points goes with about 5.5 hours of study.

The equation will give you a number for any xx-value you put in. That does not make every number a sensible prediction. A prediction is reasonable when it is supported by the data and possible in the situation. Two things decide this.

First, the model was chosen using study times from 0 to 6 hours only. Inside that data range, the table shows the line staying close to real scores, so you have evidence for the trend. Outside it, you have no data. The trend might continue, level off or change, and the model cannot tell you which.

Second, the situation sets limits. A score on this test cannot be below 0 or above 100 points, so a model value outside those limits cannot be a real score.

Look back at your two results. Both 3.5 hours and 5.5 hours are inside 0≤x≤60 \le x \le 6, and both 73 and 85 are possible scores. Those are reasonable estimates.

Key concept

Two checks for a reasonable prediction

A linear model's equation is exact, but its fit to the data is approximate, so every prediction is an estimate. For a model whose line stays close to its data, treat a prediction as reasonable when the answer to both questions is yes:

  1. Data range: Is the xx-value inside the range of xx-values that the data cover?
  2. Context: Is the yy-value one that can really happen in the situation?

If the xx-value is outside the data range, the data give no evidence there. Use the prediction with caution, and trust it less the farther outside it is. If the yy-value is impossible, the prediction is not reasonable.

Worked example

Judge two predictions

The model y=6x+52y = 6x + 52 was chosen from study times of 0 to 6 hours, and the test is worth 100 points. Is the model's prediction reasonable for (a) 7 hours of study and (b) 9 hours of study?

  1. Part (a). Find the model's value for 7 hours by substituting 7 for x.

    6(7)+52=42+52=946(7) + 52 = 42 + 52 = 94
  2. Check the data range. 7 is greater than 6, so 7 hours lies 1 hour outside the range. No student in the data studied that long, so the data cannot show whether the trend continues there.

    7>67 > 6
  3. Check the context. 94 is between 0 and 100, so it is a possible score. One check passes and one fails: the value is possible, but the data do not support it, so use it only with caution.

    0≤94≤1000 \le 94 \le 100
  4. Part (b). Find the model's value for 9 hours.

    6(9)+52=54+52=1066(9) + 52 = 54 + 52 = 106
  5. Run both checks. 9 hours lies 3 hours outside the data range, and 106 is more than the 100 points on the test. Both checks fail. Since no score can pass 100, real scores cannot keep following this line that far beyond the data.

    9>6and106>1009 > 6 \quad \text{and} \quad 106 > 100

Answer

(a) About 94 points is a possible score, but 7 hours is outside the data range, so use this prediction only with caution. (b) 106 points is not a reasonable prediction, because 9 hours is well outside the data range and no score can pass 100 points.

To interpret a model is to say in words what its numbers tell you about the situation. You already know that the yy-intercept, 52 here, is the model's value when x=0x = 0. The slope, 6 here, is the rate of change: the model's score rises 6 points for each extra hour of study.

An interpretation goes wrong when it gives a number the wrong job, uses the wrong units, or claims more certainty than the data allow. You find an error by testing a statement against what the model really says. You correct it by rewriting the statement so that every check passes. The table lists the checks for the study-time model.

Checks for a statement about the model y = 6x + 52
What to checkQuestion to askWhat is true for this model
Slope
Is it read as a rate, with both units?
66 points per hour of study
yy-intercept
Is it read as the model's value at x=0x = 0?
5252 points for 00 hours of study
Units
Is the xx-value in the units the model uses?
Hours, not minutes
Data range
Is the xx-value inside the range the data cover?
0≤x≤60 \le x \le 6
Context
Can the yy-value really happen?
A score is from 00 to 100100 points
Fit
Does it allow a gap between a real score and the model's value?
Gaps of 11 to 33 points in this data
Wording
Does it say "about" and stop short of claiming a cause?
The data show a trend, not a cause

Worked example

Find and correct three errors

A student wrote three notes about the model y=6x+52y = 6x + 52, where xx is the study time in hours and yy is the score in points. Find and correct the error in each note. Note A: The 6 is the score the model gives for a student who does not study. Note B: For 30 minutes of study, the model gives 6(30)+52=2326(30) + 52 = 232 points. Note C: The student who studied 3 hours scored 67, but the model gives 70, so the model is wrong.

  1. Start from what the model really says, so you have facts to test each note against. The slope 6 is a rate: 6 points per hour. The y-intercept 52 is the model's score at 0 hours. The x-value must be in hours.

    y=6x+52y = 6x + 52
  2. Test note A. A student who does not study has x = 0, and the model's value there is the y-intercept, 52. The note gives that job to the slope. Corrected: the model gives 52 points for 0 hours of study, and its score rises 6 points for each extra hour.

    6(0)+52=526(0) + 52 = 52
  3. Test note B with the context check. 232 is more than 100 points, so it is impossible. That signals a mistake. The 30 is a number of minutes, but x must be in hours. Convert, using 60 minutes = 1 hour.

    30Ā minutes=3060Ā hour=0.5Ā hour30 \text{ minutes} = \frac{30}{60} \text{ hour} = 0.5 \text{ hour}
  4. Redo the prediction with x = 0.5. Now 0.5 is inside the data range of 0 to 6 hours, and 55 is a possible score, so both checks pass.

    6(0.5)+52=3+52=556(0.5) + 52 = 3 + 52 = 55
  5. Test note C. A linear model is chosen to stay close to the data, not to hit every data point. The gap here is 3 points, which matches the gaps of 1 to 3 points in the table. A gap that size is no reason to call the model wrong.

    67āˆ’70=āˆ’367 - 70 = -3

Answer

Note A swaps two jobs: the model gives 52 points for 0 hours, and its score rises 6 points per hour. Note B used minutes: with x=0.5x = 0.5, the prediction is about 55 points. Note C expects an exact match: a 3-point gap is no surprise, because the model's fit is only approximate.

Here is the idea to take with you. A linear model turns an xx-value into a prediction: substitute the value in the model's units and compute. The arithmetic is exact, but the line only stays close to the data, so every prediction is an estimate.

Trust a prediction most when its xx-value is inside the data range and its yy-value can really happen. When you check an interpretation, give each number its correct job and units, say about, and remember that two quantities changing together does not prove that one causes the other.