Resources For Teachers For Tutors For Students & Parents AI New Pricing
Year 10 Maths - 10A Statistics

Line of Best Fit by Eye

20 practice questions 1 video lesson Theory + worked examples
Practice 20 questions
Practice questions

Every question with a fully worked solution.

Start practising
Watch 1 video(s)
  • Line of Best Fit by Eye - Video - Line of Best Fit Part 1 Watch
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

A line of best fit (trend line) is a straight line that follows the pattern of a linear scatter plot. Its equation lets you predict one variable from the other, and its gradient and intercept describe the relationship. This Year 10A maths page covers drawing it by eye through the mean point, finding and interpreting its equation, predicting both ways, judging interpolation and extrapolation, and deciding when a straight line is not suitable.

Bivariate data records two variables for each person or item, such as height and foot length. The independent (explanatory) variable goes on the horizontal axis and the dependent variable, the one we want to predict, on the vertical axis.

A line of best fit is a straight line drawn through a scatter plot with a linear association so that the points are spread evenly either side of it. It need not pass through any data point.

The mean point \((\bar{x}, \bar{y})\) is a good point to draw the line through.

In \(y = mx + c\), the gradient \(m\) is the average change in \(y\) for each increase of \(1\) in \(x\); the intercept \(c\) is the predicted \(y\) when \(x = 0\) (which may or may not make sense).

A prediction inside the range of the data is interpolation; outside it is extrapolation, which is less reliable because the trend may change. A calculator or spreadsheet can also find a line of best fit (the least-squares line); that is covered on the Linear Regression Using Technology page.

Line of best fit by eye through the mean pointEight points rising from left to right with a straight line drawn through their mean point. The points are balanced, with about half above the line and half below. x y mean point
Draw the line so the points are balanced either side of it, following the trend. A good line passes through (or very near) the mean point \((\bar{x}, \bar{y})\).
Interpolation and extrapolationA number line for x. The shaded section between the smallest x-value in the data, 10, and the largest, 45, is where predictions are interpolation. Beyond either end, predictions are extrapolation and are less reliable. 0102030405060 interpolation (inside the data) extra- polation extra- polation less reliable smallest x largest x
Predictions inside the range of the data are interpolation. Predictions outside it are extrapolation: the pattern may not continue.
\[m = \dfrac{y_2 - y_1}{x_2 - x_1}\]
\[y - y_1 = m(x - x_1)\]
\[(\bar{x}, \bar{y}) = \left(\dfrac{\sum x}{n},\ \dfrac{\sum y}{n}\right)\]
y−y1=m(x−x1)
Reading the line from a graph. Choose two points on the line (not data points) that are far apart and easy to read, often where it crosses grid lines. Use the line's own variable names, e.g. \(T = 3d + 12\), not \(y = 3x + 12\).
Working backwards. To find \(x\) for a given \(y\), substitute \(y\) and solve. If a budget is involved, first turn the money into the quantity (e.g. \(\$36\,000\) at \(\$450\) per unit is \(80\) units), then solve. A change in \(y\) of \(k\) goes with a change in \(x\) of \(\dfrac{k}{m}\).
How far out is a prediction? Compare the actual value with the predicted one: actual \(-\) predicted. If \(W = 1.2h - 110\) predicts \(1.2(150) - 110 = 70\) kg for a \(150\) cm person who weighs \(74\) kg, the prediction is \(4\) kg too low.
Two lines of best fit. To find where two models give the same value, make them equal and solve. For \(A = 500 - 30t\) and \(B = 620 - 50t\): \(500 - 30t = 620 - 50t\), so \(20t = 120\), \(t = 6\), and both give \(320\).

Drawing and using a line of best fit

  1. Check the scatter plot shows a linear association (a curve needs a different model).
  2. Find the mean point and mark it.
  3. Draw a straight line through the mean point following the trend, with about as many points above as below.
  4. Equation: read two points on the line (or use the mean point and the intercept), find \(m\), then \(c\).
  5. Interpret \(m\) and \(c\) in words, with units.
  6. Predict: substitute \(x\) to find \(y\), or substitute \(y\) and solve for \(x\). Say whether it is interpolation or extrapolation.

Is a straight line suitable?

  1. Plot the points before drawing any line.
  2. Curved pattern: if the values rise (or fall) by more and more each step, the association is non-linear, and a straight line of best fit gives poor predictions.
  3. Separate groups: if the points form two clusters (two types of item), one line through all of them fits neither group. Use a line for each group.
  4. Outlier: leave an obvious outlier out when you draw the line.
Example 1 β€” Equation of a line drawn by eye
The table gives the age and value of seven used cars of the same model. A line of best fit has been drawn through the mean point and \((0, 33)\).
Age \(x\) (years)Value \(y\) (\(\$\) thousand)
\(1\)\(30\)
\(2\)\(27\)
\(3\)\(25\)
\(4\)\(21\)
\(5\)\(20\)
\(6\)\(16\)
\(7\)\(15\)
Car age and valueSeven points falling from (1, 30) to (7, 15), with a line of best fit through the mean point (4, 22) and the point (0, 33). age value 1 2 3 4 5 6 7 15 20 25 30 (4, 22)
(i) Find the mean point. (ii) Find the equation of the line. (iii) Interpret the gradient and the \(y\)-intercept. (iv) Predict the value of a \(5.5\)-year-old car.
Solution

(i) \(\bar{x} = \dfrac{28}{7} = 4\), \(\bar{y} = \dfrac{154}{7} = 22\). Mean point \(\boldsymbol{(4, 22)}\).

(ii) Through \((0, 33)\) and \((4, 22)\):

\(m\)\(=\)\(\dfrac{22 - 33}{4 - 0} = -2.75\)
\(y\)\(=\)\(\boldsymbol{-2.75x + 33}\)

(iii) Gradient: the value falls by about \(\$2750\) for each extra year of age. Intercept: a new car (\(x = 0\)) is worth about \(\$33\,000\).

(iv)

\(y\)\(=\)\(-2.75(5.5) + 33 = 17.875\)

About \(\boldsymbol{\$17\,900}\). This is interpolation (\(5.5\) is between \(1\) and \(7\)), so it is reasonably reliable.

y=−2.75x+33
Example 2 β€” Predicting both ways
For one phone model, a line of best fit for battery remaining, \(B\%\), against hours of video streaming, \(t\), passes through \((1, 88)\) and \((5, 40)\). The data covered \(0.5\) to \(6\) hours.
(i) Find the equation.
(ii) Predict \(B\) after \(3.5\) hours.
(iii) When does the line predict \(10\%\) left? Comment on its reliability.
Solution

(i)

\(m\)\(=\)\(\dfrac{40 - 88}{5 - 1} = -12\)
\(88\)\(=\)\(-12(1) + c \quad\Rightarrow\quad c = 100\)
\(B\)\(=\)\(\boldsymbol{100 - 12t}\)

(ii)

\(B\)\(=\)\(100 - 12(3.5) = \boldsymbol{58\%}\)

(iii) Solve for \(t\):

\(100 - 12t\)\(=\)\(10\)
\(12t\)\(=\)\(90\)
\(t\)\(=\)\(\boldsymbol{7.5}~\text{hours}\)

\(7.5\) hours is beyond the largest value in the data (\(6\) hours), so this is extrapolation and less reliable: batteries often drain faster or slower near empty.

B=100−12t
Example 3 β€” Is a straight line suitable?
(i) A ball is dropped from a tower. The table shows the distance it has fallen after \(t\) seconds.
Time, \(t\) (s)Distance, \(d\) (m)
\(0.5\)\(1.2\)
\(1\)\(4.9\)
\(1.5\)\(11.0\)
\(2\)\(19.6\)
\(2.5\)\(30.6\)
\(3\)\(44.1\)
Describe the association. Is a straight line of best fit suitable?
(ii) A shop sells coffee beans in two ranges, standard and organic. The table shows the prices.
Mass (g)Standard (\(\$\))Organic (\(\$\))
\(250\)\(8\)\(13\)
\(500\)\(14\)\(23\)
\(750\)\(20\)\(33\)
\(1000\)\(26\)\(43\)
Should one line of best fit be drawn through all eight points?
Solution

(i) Find the increase in distance for each half-second:

\(\text{increases}\)\(:\)\(3.7,\ 6.1,\ 8.6,\ 11.0,\ 13.5\)

The distance rises by more each time, so the points curve upwards: a positive, non-linear association. A straight line would sit above the points in the middle and below them at the ends, so it is not suitable for predictions.

(ii) Each range on its own is exactly linear: standard prices rise \(\$6\) and organic prices \(\$10\) for every extra \(250\) g. On a scatter plot they make two separate groups, with the organic points above the standard ones.

One line through all eight points would pass between the groups and fit neither of them. No: draw a separate line for each range, and say which range a prediction is for. The range of coffee is a third variable that splits the data.

Example 4 β€” The mean point is on the line
The line of best fit \(y = 3x + 2\) passes through the mean point of \((1, 6)\), \((2, 7)\), \((4, a)\), \((5, 18)\) and \((8, 25)\). Find \(a\).
Solution

Find \(\bar{x}\) from the known \(x\)-values, then use the line to get \(\bar{y}\).

\(\bar{x}\)\(=\)\(\dfrac{1 + 2 + 4 + 5 + 8}{5} = 4\)
\(\bar{y}\)\(=\)\(3(4) + 2 = 14\)

So the \(y\)-values add to \(5 \times 14 = 70\).

\(6 + 7 + a + 18 + 25\)\(=\)\(70\)
\(a\)\(=\)\(\boldsymbol{14}\)
y¯=3x¯+2

If the unknown is in the \(x\)-values as well, write \(\bar{x}\) and \(\bar{y}\) in terms of it and substitute both into the line.

Common pitfalls

Use points on the line, not data points. Two data points generally do not lie on the line of best fit, so they give a different equation.
Do not just join the first and last points. A line of best fit balances all the points; one end point may be unusual.
Extrapolation can be nonsense. A tree growing \(0.8\) m a year will not be \(80\) m tall at \(100\) years. Say why a prediction outside the data may fail.
The intercept may not make sense. If \(x = 0\) is outside the data, the intercept is just where the line crosses the axis, not a real value.
Association is not cause. A line of best fit describes a trend; it does not show that \(x\) causes \(y\).
Watch for a hidden variable. Two quantities can rise together because a third one drives both, such as the size of a fire driving both the number of trucks sent and the damage done.

Frequently asked questions

How do you draw a line of best fit?

Find the mean point and draw a straight line through it that follows the trend of the points, with roughly the same number of points above and below the line.

How do you find the equation of a line of best fit?

Choose two points on the line, find the gradient as rise over run, then substitute one point into y equals mx plus c to find c. Use the variable names from the question.

What is the difference between interpolation and extrapolation?

Interpolation predicts within the range of the data and is usually reliable. Extrapolation predicts outside that range and is less reliable, because the pattern may not continue.

What does the gradient of a line of best fit mean?

It is the average change in the y variable for each increase of 1 in the x variable, for example a drop of 2750 dollars in value for each extra year of age.

When should you not use a straight line of best fit?

When the points curve, or when they form separate groups. A curved pattern is non-linear, so a straight line gives poor predictions. Separate groups, such as two types of product, need a separate line for each group.