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.

Start learning thisNo 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

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
  • 62 minutes, an in-range estimate rather than an exact promise (The answer)

    76 - 2 × 7 = 62. The target is within 2 to 14, but individual race times can differ from the line.

  • 62 minutes, guaranteed for every runner who trains seven times

    The arithmetic gives 62, but a fitted line does not guarantee each runner's time. Scatter and other differences still matter.

  • 7 minutes, because run count also gives the finishing time

    7 is the input x. Replace x with 7 in the rule to calculate the predicted time y.

Write 62 minutes as the estimate and keep the measured range, 2 to 14 runs, beside it.

One recorded runner did 6 runs and finished in 63 minutes. The fitted line gives 76 - 2 × 6 = 64 minutes.

How does this observation compare with the line's prediction?

6 runspredicted: 64 minobserved: 63 min
  • The observation is 1 minute above the prediction

    Compare 63 with 64. The observed value is lower, not higher.

  • The observation is 1 minute below the prediction (The answer)

    Observed minus predicted is 63 - 64 = -1. The time is 1 minute below the line.

  • The observation must equal the prediction because 6 is in range

    Being in range does not put every point on the line. Here 63 differs from the prediction, 64.

An in-range estimate can be useful without matching an individual observation exactly.

Leo evaluates the line at 40 runs. He gets 76 - 2 × 40 = -4 minutes and calls it a usable race-time prediction.

Which check identifies the problem?

40 runs76 - 80-4 minutes
  • Replace subtraction with addition whenever the result is negative

    Changing the rule without evidence does not repair the model. The subtraction matches the given equation.

  • Treat negative elapsed time as a valid result for a fast runner

    Elapsed race time cannot be negative. Correct arithmetic can still produce an unsuitable prediction.

  • 40 is outside 2 to 14, and elapsed race time cannot be negative (The answer)

    Both checks matter. This is distant extrapolation, and the result also breaks a physical limit.

The arithmetic is correct. The prediction is unsuitable for this situation.

At 25 runs the same line gives 26 minutes. The result passes the nonnegative-time check, but 25 is still beyond the recorded range.

What should accompany this estimate?

  • A guarantee of 26 minutes because the calculated time is positive

    A positive result passes one physical check. It does not show that the trend continues beyond 14 runs.

  • A warning that 25 is 11 runs beyond the measured upper endpoint (The answer)

    25 - 14 = 11. Report the extrapolation and its untested continuation with the estimate.

  • A claim that every extrapolation must give an impossible result

    An extrapolation can give a plausible number. Plausibility alone does not show that the prediction is reliable.

25 is nearer the measured range than 40, but distance alone cannot settle model suitability.

The same log records shoe purchases. The runners who bought new shoes finished faster, but their training habits may differ too.

What conclusion does this comparison support?

  • An association to investigate, with training as a possible shared explanation (The answer)

    The association is recorded. Training could help explain it, but the comparison proves neither that explanation nor an effect of shoes.

  • A proven shoe effect, because shoe buyers have faster times

    The groups chose their shoes and may differ in other ways. The association does not isolate a shoe effect.

  • Proof that shoes have no effect, because training is the only explanation

    Training is one possible explanation. This comparison proves neither a shoe effect nor its absence.

A stronger test would address differences between the groups instead of relying on their association alone.

Report the fitted estimate with its measured range. Check whether the model suits the target, and separate an association from a causal conclusion.

  • At 7 runs the line estimates 62 minutes within the measured range.
  • An individual observation can differ from an in-range prediction.
  • At 40 runs the negative elapsed time fails a physical check.
  • At 25 runs the target is 11 runs beyond the measured endpoint.
  • The shoe comparison does not isolate a causal effect.

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.

Start learning this