Grade by Grade
D. Statistical Analysis · Two-Variable Data Analysis and Validity

Using Models: Predictions and Comparing Relationships

D2.4 D2.5About 70 minutes
Learning goals
  • I can use a regression model to make predictions and judge whether each prediction is reasonable.
  • I can tell interpolation from extrapolation and explain the risks of extrapolating.
  • I can compare two related two-variable data sets using r, r², slopes and graphs.
  • I can write a complete, justified description of a two-variable relationship, and spot summaries that misrepresent data.

Words to know

interpolation
Predicting y for an x-value inside the range of the data used to build the model.
extrapolation
Predicting y for an x-value outside the range of the data. Risky, because the pattern may change.
model
A mathematical description (here, an equation) that approximates the pattern in the data.
lurking variable
A variable that is not in the analysis but affects the variables being studied.

Is math more like science or like English?

The Ontario curriculum suggests a classic investigation: compare the relationship between Grade 12 math and English marks with the relationship between science and math marks. A guidance counsellor collected the final marks of 10 students who took all three courses. Is a student's math mark a good predictor of their science mark? Of their English mark?

StudentABCDEFGHIJ
Math55626670747881859095
Science58606867757483828893
English72658070688475718678
Final marks (%) for 10 students (made-up data).
50607080901005060708090100Math mark (%)Science mark (%)Science vs mathr ≈ 0.9850607080901005060708090100Math mark (%)English mark (%)English vs mathr ≈ 0.49
Same students, same math marks. Science marks follow math marks closely; English marks drift up only slightly, with a lot of scatter.
Worked example

Example 1: Comparing the two relationships

Use technology or the formulas to find r, r² and the least-squares line for science vs math and for English vs math. Compare the relationships.

  1. Science vs math: r ≈ 0.981, r² ≈ 0.963, ŷ ≈ 0.908x + 6.18.
  2. English vs math: r ≈ 0.492, r² ≈ 0.242, ŷ ≈ 0.270x + 54.48.
  3. Strength: science is very strongly related to math (about 96% of the variation in science marks is explained by the linear relationship with math); English is only moderately related (about 24%).
  4. Slope: each extra percentage point in math goes with about 0.91 points in science but only about 0.27 points in English.
  5. Graphs: both are roughly linear with no clear outliers; the English plot has much more scatter.

Math marks are a much better predictor of science marks than of English marks for these students. A reasonable explanation: science courses use many of the same skills (algebra, graphs, problem solving) as math. Remember the limits: only 10 students, all from one school, and correlation does not show that math skill causes science success.

Making predictions

A model is useful for predicting y from x, but every prediction needs a reality check.

  • Interpolation: predicting for an x inside the range of the data. Usually reasonable, if the model fits well.
  • Extrapolation: predicting outside the range. The pattern might change, so be cautious and say so.

Also consider the precision: a model with a small s_e (or r close to ±1) gives tighter predictions than one with lots of scatter.

−35−30−25−20−15−10−505101520020406080100120140160Daily high temperature (°C)Cups soldInterpolation inside the data, extrapolation outsidedata range(interpolation)extrapolation(colder than any data)extrapolation(rink ice melts?)
The model was built from days between −16 °C and 4 °C (green band). Predicting inside the band is interpolation. The dashed parts are extrapolation: at 20 °C the outdoor rink would have no ice, and at −35 °C the rink might close.
Worked example

Example 2: Interpolate or extrapolate?

The rink model is ŷ = −2.37x + 56.99 (data from −16 °C to 4 °C). Predict sales at −7 °C, at −30 °C and at 15 °C, and comment on each.

  1. −7 °C: ŷ = −2.37(−7) + 56.99 ≈ 74 cups. Inside the data range: interpolation, reasonable.
  2. −30 °C: ŷ = −2.37(−30) + 56.99 ≈ 128 cups. Extrapolation. At −30 °C, fewer people might come to skate at all, so the true number could be much lower.
  3. 15 °C: ŷ = −2.37(15) + 56.99 ≈ 21 cups. Extrapolation, and the outdoor rink would have melted: the situation itself changes.

About 74 cups at −7 °C is a sensible prediction. The other two are extrapolations; the model may not apply, so report them with a clear warning (or not at all).

Worked example

Example 3: Predicting a science mark

Predict the science mark of a student with 72% in math, using the science model, and decide how much to trust it.

  1. ŷ = 0.908(72) + 6.18 ≈ 71.5%.
  2. 72 is inside the math range (55 to 95): interpolation.
  3. r ≈ 0.98 and the residuals are small (typically 2 to 3 points), so the prediction is fairly precise.

About 72%, and we can expect the actual mark to be within a few percentage points. A prediction from the English model would be much less precise.

How summaries can mislead

Two-variable summaries are powerful, but they can misrepresent data when used carelessly:

  • r alone says nothing about the slope. Two data sets can have the same r but very different slopes.
  • A steep slope does not mean a strong relationship; the points might be widely scattered.
  • Tiny samples can produce impressive r values by chance.
  • Extrapolating a trend ("at this rate, by 2100...") assumes the pattern never changes.
  • Hiding the graph hides curves, outliers and clusters.
  • Combining groups can create or hide relationships (the lesson on hidden variables explores this).

A complete description of a relationship gives the form, direction and strength (with r), the model with its slope interpreted, how well it fits (r², residuals), any unusual points, the range where predictions are reasonable, and the limits of the data (sample size, how it was collected, correlation ≠ cause).

A template for writing about a relationship

"For [who / how many], there is a [strong/moderate/weak] [positive/negative] [linear/nonlinear] relationship between [x] and [y] (r = ___). The least-squares line is ŷ = ___; each additional [unit of x] is associated with about ___ [units of y]. The model explains about ___% of the variation in [y]. [Unusual points]. Predictions are reasonable for [x] between ___ and ___. Limitations: ___."

Just for fun

At the current rate, the length of the average Grade 12 essay grows by a page every week of the semester. Extrapolate to the end of university and every student will be writing a 200-page essay a week. This is why statisticians are nervous about extrapolation.

Hands-on activity

Marks or minutes: compare two relationships

You need: data you can find at home, a calculator, and a spreadsheet or Desmos if possible.

Choose one of these (or invent your own pair of related comparisons):

  • Family sports or games: for 8 or more games, the minutes played vs points scored for two different players.
  • Grocery receipts: for 10 or more items, the price vs the mass (from the label) for fruit and vegetables compared with snacks.
  • Your own marks: your test marks in two courses across the semester (only your own data).
  1. Make two scatter plots on the same scales.
  2. Find r, r² and the least-squares line for each.
  3. Write a comparison using the template above.
  4. Make one interpolation and one extrapolation, and comment on each.

What to look for: a good comparison uses numbers from both relationships, interprets both slopes in context, and names at least one limitation (small sample, other variables, extrapolation).

Your turn

1

A model ŷ = 1.5x + 20 was built from x-values between 10 and 40. Predict y for x = 30 and for x = 100. Which prediction is extrapolation?

2

Relationship P has r = 0.9 and slope 0.2. Relationship Q has r = 0.5 and slope 3. Which is stronger? Which has y changing faster with x?

3

Using the English model, predict the English mark for a student with 80% in math.

4

A model of a child's height vs age (ages 2 to 12) has slope 6 cm/year. Why would predicting height at age 40 be silly?

5

A company says, "r = 0.95 between our ad spending and sales over 4 months." Give two reasons to be cautious.

6

Write a complete description for: 12 cities, x = average January temperature (°C), y = winter heating cost ($), r = −0.88, ŷ = −35x + 900, x from −20 to 0.

More practice: warm-up

1

Is predicting inside the data range interpolation or extrapolation?

2

A model is built for x from 0 to 50. Is x = 75 interpolation?

3

r = 0.98 for model A and 0.60 for model B. Which gives more precise predictions (if all else is similar)?

4

ŷ = 0.5x + 4. Predict y at x = 12.

5

Does a steep slope always mean a strong correlation?

More practice: on your own

1

For the science model, find the residual for student F (math 78, science 74).

2

Two models: ŷ = 2x + 5 with r = 0.4, and ŷ = 2x + 5 with r = 0.95. Same line. How do their scatter plots differ?

3

Over 10 years, a town's population grew from 12 000 to 15 000 in a nearly straight line. A councillor predicts 45 000 in 100 more years. Comment.

4

Why should a complete description include the range of x-values in the data?

5

The math and science data have r ≈ 0.98. A student concludes "being good at math makes you good at science." Write a better conclusion.

Challenge

1

Using the summary statistics, verify the science slope: s_x (math) ≈ 12.66, s_y (science) ≈ 11.71, r ≈ 0.9815.

2

Explain why the English model's slope (about 0.27) is so much smaller than the science model's slope (about 0.91), even though both use the same math marks.

3

A model is built from Grade 9 to 12 students: y = hours of homework, x = grade. It predicts a university first-year student ("grade 13") does about 2 hours more homework than a Grade 12 student. Discuss whether this extrapolation is reasonable.

Check your understanding

Quiz

1.

A model was built from data with x between 20 and 60. Predicting at x = 45 is:

2.

Which situation makes extrapolation most risky?

3.

Science vs math has r = 0.98; English vs math has r = 0.49. Which conclusion is best?

4.

Two relationships have the same value of r. Which statement is true?

5.

A model ŷ = −0.8x + 70 (x from 0 to 50) predicts y for x = 100. The prediction is:

6.

Which is part of a complete description of a two-variable relationship?

For parents and teachers

Big idea (D2.4, D2.5): a model is only as good as the situation it came from. Predictions inside the data (interpolation) are usually fine; predictions outside (extrapolation) need a warning. When comparing two relationships, use r, r², slopes and the graphs together.

How to help: Ask your teen to make one sensible and one silly prediction from any model, and explain which is which. Discuss news claims like "at this rate, by 2050...".

Common difficulties:

  • Confusing a steep slope with a strong relationship.
  • Extrapolating without noticing the change in situation.
  • Writing conclusions that claim cause from correlation.
  • Leaving out the sample size and the range of the data when describing a model.