LightMySky

Lines of best fit: prediction and its limits

Use a line of best fit to estimate values, state the measured range and limits of the estimate, and distinguish correlation from cause.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Use a fitted line to estimate values, compare predictions with observations, and state the measured range and limits of use
  • Explain the assumptions and possible errors when a fitted line is used beyond the measured data
  • Explain why correlation alone does not establish cause and how a fair comparison can test a causal claim

1 · Read

You have used scatter graphs to describe correlation. Now check a fitted line's limits. In this example, ten Wren Lane runners recorded training runs and race times in minutes. Their run counts range from 2 to 14. A fitted line is y = 76 - 2x, where x is runs and y is predicted minutes. The measured range comes from the recorded x values, not from how far the line or axis is drawn.

(2, 74)(6, 63)(10, 55)(14, 47)
These are four recorded pairs, not a scatter graph. Recorded times need not lie exactly on the fitted line.

To predict y, replace x with the target and multiply before adding or subtracting. At 7 runs, y = 76 - 2 × 7 = 62 minutes. For y = 9 + 1.5x at x = 4, y = 15. On a graph, move vertically from x to the line, then horizontally to the y-axis. Interpolation uses x within the measured range, including its endpoints. It is usually better supported than distant extrapolation, but wide vertical scatter makes individual predictions uncertain.

Training runs. Ticks: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20. Marked values: 2, 7, 14. Hop from 2 to 14: measured range.01234567891011121314151617181920measured rangeTraining runs
The recorded endpoints are 2 and 14. The target 7 lies between them.

Extrapolation predicts beyond the measured x range. At 40 runs the rule gives -4 minutes; at 25 it gives 26. Neither target was measured. Above the range, subtract the upper endpoint: 25 - 14 = 11 runs. Below it, subtract the target from the lower endpoint. Farther extrapolation generally adds uncertainty, but a relationship can change abruptly near an endpoint. Extending the drawing adds no measurements.

A close fit over a short interval does not guarantee a good fit farther out. The relationship may curve, flatten or change. Check physical limits: elapsed race time cannot be negative; the percentage of a container filled cannot exceed 100%. An impossible prediction means the model is unsuitable there, whether inside or outside the measured range. Investigate unusual points. Correct confirmed errors, but do not delete genuine observations just to improve the fit.

Correlation alone cannot establish cause, even when strong. Either variable might affect the other, a shared factor might affect both, or chance might produce the pattern. Hot, sunny weather could increase both ice cream sales and sunburn cases. Runners buying new shoes may also train more. These are explanations to investigate, not conclusions proved by a graph. A negative correlation does not prove that one variable prevents the other.

record paired valuesdescribe the patterncheck explanations
Describing a pattern and testing its explanation are separate jobs.

To test a stretching routine, researchers could assign suitable volunteers at random to routine and comparison groups. Both groups should have similar conditions and the same way of measuring results. Random assignment reduces systematic differences caused by people choosing their group. It does not guarantee identical groups or prove an effect by itself. Chance variation and other differences still need consideration.

Compare an observation with the line by subtracting predicted from observed. A prediction of 32 and observation of 35 give 35 - 32 = 3 above the line. A negative difference means below the line. For a predicted count, round as requested: 19.7 visitors is about 20 visitors to the nearest whole visitor. The fractional part is at least 0.5, so round up. This is still an estimate, not a promise of exactly 20.

predicted: 32observed: 3535 - 32 = 3
Compare the observation with the fitted line's value at the same x.

To find x from a target y, undo the equation's operations. For y = 10 + 4x and y = 26, subtract 10, then divide by 4: x = 4. If observed minus predicted is -3 and observed is 23, first recover predicted = 23 - (-3) = 26. Then solve for x as above. With measured x from 6 to 15, x = 4 is 6 - 4 = 2 below the range. Check by substitution: 10 + 4 × 4 = 26. Solving locates a model point, not a causal effect.

23 - (-3) = 26(26 - 10) ÷ 4 = 46 - 4 = 2

Range is only one check. A line fitted to adults may not suit children, even when the target x lies within the adult data's range. Conditions can change too. State the population, measured range and relevant uncertainty when reporting a prediction. If the needed cases are missing, collect suitable new data and check the model again rather than treating a longer line as new evidence.

Use the line, state the measured range and check uncertainty. Extrapolation needs caution. Check the model, population and physical limits. Correlation alone does not establish cause.

Lesson, questions and flashcards written for this dataset.

Readings, extra questions and flashcards written for this dataset. Linked video references: Khan Academy.

More to read

Checking a prediction

An equation gives the fitted line's estimate, not the next observation itself. Replace x with the target and calculate y. On a graph, start at the target on the x-axis, move vertically to the line, then horizontally to the y-axis.

Keep the measured x range beside the result. Predicting at a target within that range is interpolation; predicting beyond it is extrapolation. The labels describe where the target lies. They do not settle whether the model is suitable.

Inspect the scatter too. Observations spread widely above and below the line can make an individual prediction uncertain, even when its x value lies within the recorded range.

Testing an explanation

Suppose shoe buyers in a running club have faster race times. Comparing those runners does not isolate an effect of shoes. Their training habits may differ, and those habits could affect both purchases and performance.

Researchers can reduce self-selection by assigning suitable volunteers to groups at random. They should also use similar conditions and measure results in the same way. Random assignment does not make every characteristic identical across the groups. Chance differences remain possible.

A causal explanation needs evidence that addresses alternatives. A clear association alone does not tell you whether either variable affects the other.

Investigating an unusual point

When a point lies far from a fitted line, check the original record. Were the units consistent? Was a value copied correctly? Correct a confirmed error using evidence and record the correction.

If the observation is genuine, it may show real variation or a condition that the model misses. Do not delete it just to make the fit appear better. Explain any decision to exclude it.

The overall pattern matters as well. A curved relationship may look nearly straight over a short interval. A close fit there does not establish the shape beyond that interval.

Checking what the answer means

A rule can return a number that breaks a physical limit. Elapsed time cannot be negative, and a container cannot be more than 100% filled. Such a result shows that the model is unsuitable at that target. It does not, by itself, reveal the measured range.

A fractional estimate of a count is different. It can be rounded to the requested precision, while remaining an estimate rather than a guaranteed outcome.

Solving the equation for x at a target y finds a point on the model. It does not prove that changing x will cause that outcome. Check the measured range, population and conditions before using the result.

Explore more

2 · Watch

3 · Play

step 1 of 6

You have used scatter graphs to describe correlation. Now use the Wren Lane example: ten runners recorded 2 to 14 training runs, and the fitted line is y = 76 - 2x, with y in minutes.

What does the line predict for 7 runs, and how should the result be described?

Training runs. Ticks: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14. Marked values: 2, 7, 14. 234567891011121314Training runs

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Where this leads

Jobs that lean on this skill. Follow one to see everything it is built on.

Then practise

33 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Lines of best fit: prediction and its limits · Mathematics, ages 15 to 16 · LightMySky