Doctors use growth charts to check that children are growing healthily. Here are the median (middle) heights of boys at each birthday from age 2 to 12, taken from the World Health Organization’s growth charts and rounded to the nearest cm (so treat them as approximate):
| age (years) | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| height (cm) | 87 | 96 | 103 | 110 | 116 | 122 | 127 | 133 | 138 | 143 | 149 |
Between ages 4 and 12 the height goes up by roughly 6 cm every year. That looks almost linear.
So: if a boy keeps growing “like this”, how tall will he be at age 30? Make a guess — and decide whether you would trust it.
The points in this table are not perfectly on a straight line — real data never is. But they are close to one. Today you will learn to draw the straight line that best describes a cloud of real data, write its equation, use it to predict… and recognise the moment a prediction stops making sense.
Try these first. Nothing is marked: just have a go.
A class measures a sunflower every 10 days (illustrative data):
| day | 10 | 20 | 30 | 40 |
|---|---|---|---|---|
| height (cm) | 30 | 52 | 71 | 93 |
Estimate the sunflower's height on day 25, in cm.
The sunflower in the table grew about 2 cm a day between day 10 and day 40. A friend continues this pattern and predicts that on day 400 the sunflower will be about 8 metres tall.
What do you think of the prediction?
Water is heated in a kettle. Its temperature (°C) is read every minute (illustrative data):
| (min) | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| (°C) | 20 | 31 | 35 | 39 | 43 | 47 |
Two students suggest a line. Kim joins the first and last readings: . Lee suggests .
Which line describes the readings better? (Try putting some values of into each.)
Now fit a line to real data yourself.
- Drag the two green handles until your blue line follows the trend of the black points. Use the Balance readout: the main goal is that the total vertical distance above the line roughly cancels the total distance below it. The number of points on each side is a rougher guide.
- Is there a line that goes through every point? Does your line need to go through any of them? Does it need to go through ?
- Read your line’s equation. What does the number in front of mean for a growing child?
- Use the Predict slider. Try age 7.5, then 15, then 30, then 0. Watch the label change between interpolation and extrapolation.
- Tick reveal real heights outside the data. How good were your predictions at age 0 and age 19?
Before you explore: a straight line drawn through these points and continued all the way to age 30 would predict a height of about…
- No straight line passes through all eleven points — the data bends slightly (children grow faster at 2–3 than at 10–11). A good line goes between the points, not through them.
- A line that goes exactly through the first and last points is usually not the best: it ignores the nine points in the middle.
- Good lines found by different people are slightly different — and that is fine. Most have a gradient close to 6 and pass close to , near the middle of the data.
- Inside ages 2–12, predictions are close to the real values. Outside, they go wrong fast: about 78 cm at birth (a newborn is about 50 cm long) and over 2.5 m at age 30.
- The gradient has a meaning — cm per year, the growth rate. The intercept is a “height at age 0” that the real data never says anything about.
- Try-first 1. Day 25 lies between two measurements (52 cm on day 20, 71 cm on day 30), so an estimate of about 61 or 62 cm is pinned down by real data on both sides.
- Try-first 2. The arithmetic (about cm a day) is fine, but day 400 is ten times later than the last measurement on day 40, and a sunflower lives for only one growing season. Nothing in the data can warn you that the pattern stops.
- Try-first 3. The line through the first and last readings, , was tilted by one unusual reading and missed all four readings in between. The line is the better of the two: it follows the direction of five readings. It is not perfectly balanced, though: no reading is above it, so a balanced line would sit slightly lower. Two points chosen from the data are not the same as the trend of the data.
Lines of best fit
A scatter plot (also called a scatter graph or scatter diagram) shows paired data as points . When the points roughly follow a straight-line trend, we can model them with a line of best fit (also called a trend line).
Drawing one by eye:
- Follow the direction of the trend.
- Balance them: the vertical distances of points above the line should roughly cancel those below it. Similar numbers of points on each side is a useful rough guide.
- Because real data often curves slightly, the counts and the distances can disagree. The line in the example has 6 points above, 3 below and 2 exactly on it — yet its distances come reasonably close to cancelling (9 cm in total above, 5 cm below: a net 4 cm spread over 11 points). Trust the distances more than the counts.
- It does not have to pass through any data point, and not through the origin.
Finding its equation: pick two points on your line (not data points, unless the line goes exactly through them), far apart and easy to read. Then
Interpreting it (always with units):
- = the average change in for each 1 unit of (e.g. cm per year).
- = the model’s value of when — meaningful only if is a sensible, nearby situation.
Why balance, and why take the two points from the line
Why balance the distances? Count a distance as positive when the point is above the line and negative when it is below, and add them up. A big positive total means the points are, on average, above the line: it sits too low. Raising the line by makes every one of these distances smaller, so you can always slide it until the total is . Then the line runs through the middle of the data’s height. Balancing only fixes the height; following the direction of the trend fixes the tilt. A good line needs both. (The usual method in calculators and spreadsheets, called least squares, also makes this total . It fixes the tilt with a further rule that you will meet later.)
Why read the two points off the line? Your line is a summary of all the points. Each single data point also carries its own wobble: a measuring error, rounding, or simply a year that was a little different. An equation built from two data points copies those two wobbles and ignores every other point, as Try-first 3 showed. Points read off your line already carry the balance of all the data.
Why far apart? A small reading error matters less over a long run. If one point is misread by cm, the gradient changes by cm per year when the two points are year apart, but only by cm per year when they are years apart.
Predicting: inside or outside the data
- Interpolation = predicting inside the range of the data. Usually reliable.
- Extrapolation = predicting outside it. The further outside, the riskier: the pattern may change or stop.
Why trust drops outside the data
Inside, the data keeps the line honest. A prediction for age 7.5 sits between real measurements at ages 7 and 8, and the line stays close to both of them.
Outside, small differences grow. Take two lines for the growth data that both pass near : and . They meet at age 8. Their gradients differ by cm per year, so for every year you move away from age 8 they drift another cm apart. From age 2 to age 12 they are never more than cm apart, but at age 30 they are cm apart. Nobody can know the gradient exactly, and the further out you go, the more that uncertainty is multiplied.
And the pattern itself may stop. The data cannot tell you what happens where nobody measured: children stop growing in their late teens, a battery charges more slowly when it is nearly full, prices change. Trust an extrapolation only a short way beyond the data, and only when you have a reason to believe the pattern carries on.
Three traps
- Don’t use two data points just because they are there. The line of best fit summarises all the points. Read your two points off your line.
- Don’t force the line through . Only do that if you know must be 0 when is 0 — and even then, check the data agrees.
- Don’t trust the intercept blindly. In , the 78 is not “the height of a newborn”: age 0 is outside the data, and the real value is about 50 cm.
A model for children's growth
Use the growth data from the Hook.
Step 1 — Draw the line and choose two points on it
Suppose your line of best fit passes through and . These are points on the line, read from the grid (the data at age 4 is 103, not 102 — the line runs just below that point, which is fine).
Step 2 — Gradient, with units
Step 3 — Intercept and equation
Substitute into : , so .
Check with the other point: ✓.
Step 4 — Interpret
- Gradient 6: between ages 2 and 12, the median boy grows about 6 cm per year on average.
- Intercept 78: the model’s “height at age 0”. Age 0 is outside the data, so we must not read this as a real birth length.
Step 5 — Predict (interpolation)
Age 7.5 (seven and a half): cm. That lies between the data values at 7 (122 cm) and 8 (127 cm) — believable.
Step 6 — Is the answer sensible? (extrapolation)
Age 30: cm. Not sensible. People stop growing in their late teens, so a typical adult man is about 165–180 cm in most countries, and 258 cm is almost as tall as the tallest person ever recorded (about 272 cm). Age 0: cm — but newborns are about 50 cm long.
Conclusion: the model is good for ages about 2 to 12 — the range of the data. Outside it, the real pattern changes (fast growth in babies, a growth spurt in the teens, then no growth at all), and the straight line cannot know that.
A student's line of best fit for the growth data passes through the points and on the line.
Find the equation of the line. Use for age (years) and for height (cm).
The growth model was built from data for ages 2 to 12. Which prediction is an interpolation?
Still stuck after the example? Hearing it from another teacher often helps. These videos were checked against this lesson. Try the questions again afterwards.
Scatter Graphs - Corbettmaths · corbettmaths · about 8 min
Plotting real bird measurements, drawing a line of best fit by eye with a ruler, using it to estimate a value, and why estimating far outside the data is not sensible.
Same idea, different words: The video also names types of correlation, which this lesson does not need. It says to keep an equal number of points above and below the line; remember to balance the distances above and below as well.
WCLN - Math - Interpolation & Extrapolation · WCLN · about 6 min
What interpolation and extrapolation mean, and why a prediction made outside your data is less trustworthy, because the pattern might change there.
Can a straight-line model ever be trusted to predict the future?
Predicting the future is always extrapolation — the future is outside the data by definition. Yet scientists, economists and engineers do it every day.
When would you trust a straight-line prediction for next year? For the next 50 years? What would make you more confident: more data, data over a longer time, a reason why the pattern should continue…? Can you think of a trend that was linear for a while and then suddenly stopped?
Which line is the best line of best fit for these points?
How long to charge the electric car?
A family’s electric car is plugged into a fast charger. Their daughter records the battery level every 5 minutes (illustrative data):
| time (min) | 0 | 5 | 10 | 15 | 20 | 25 |
|---|---|---|---|---|---|---|
| battery (%) | 12 | 22 | 32 | 43 | 51 | 62 |
She plots the points and draws a line of best fit that passes through and . Answer the questions in order, and keep asking: does this make sense for a real car?
Find the equation of the line of best fit through and . Use for time in minutes and for battery %.
Use your model to estimate the battery level (in %) after 17 minutes.
The battery was measured from 0 to 25 minutes. Is your estimate for 17 minutes an interpolation or an extrapolation?
According to the model, how many minutes after plugging in will the battery reach 100%?
The family plans their journey assuming the car will be full after 44 minutes. Is that reasonable?
Discuss: interpolation vs extrapolation here, what really happens to charging speed as a battery gets full, and what you would recommend to the family. Mention at least one other limitation of the model.
📓 Work it out in your notebook first — sketch, calculate, then write your answer here in full sentences. A model answer appears after you submit, so you can compare.
Lines of best fit are a basic tool in every science lab: stretching a spring (Hooke’s law — linear only up to a limit), heating water, the speed of a cart down a ramp. In geography they show trends in population or temperature; in sport, in training data. Two big ideas come next in your maths journey: correlation (how strongly points follow a line) and the warning that correlation is not causation — two things can rise together without one causing the other. And in later years you will meet models that curve, for data that a straight line can’t capture. Next: lines that meet at right angles, and lines written in a new form, .
Explain the difference between interpolation and extrapolation to someone who missed today's lesson. Use the growth data as your example.
Your line of best fit and a friend's are slightly different. Is one of you wrong? How would you decide whose line is better?