M
hscscienceMaths Std · Y12
0/100daily goal
0
L1 · 0 XP
KJ
Your weak spots
Insights load after your first practice round.
Module 5 · L05 of 12 ~30 min MS12-7 ⚡ +70 XP available

Lines of Best Fit

Weather forecasters at the Bureau of Meteorology use trend lines through historical temperature data to estimate how much hotter Sydney summers are getting each decade. In this lesson you will learn how to draw a line of best fit by eye, how it must pass through the mean point, and how to read its equation from the graph.

Think first, How would you draw a single straight line to summarise 20 scattered points? Where would you position it? What rule would you use?
0/5QUESTS
Worksheets

Practise this lesson

Three printable worksheets that build from foundations to mastery, or build your own from any module’s questions.

01
Think First, recall from memory
+5 XP warm-up

How would you draw a single straight line to summarise 20 scattered points on a scatterplot? Where would you position it? What rule or principle would you use to decide?

auto-saved
02
The big idea, one line, balanced scatter
+5 XP to read

A line of best fit is a straight line drawn through the data on a scatterplot to represent the overall trend. It minimises the total vertical distances from the points to the line.

Key rule: Roughly equal numbers of points should be above and below the line. The line must pass through the mean point $(\bar{x},\, \bar{y})$.

Reading the equation: Once drawn, you can read the y-intercept (where the line crosses the y-axis) and the gradient (rise over run) to write $y = mx + b$.

Line passes through $(\bar{x},\, \bar{y})$
Equal points above and below
Balance the points
Roughly half the points should lie above the line and half below. Do not draw the line through only the outer points.
Always through the mean point
Calculate $(\bar{x}, \bar{y})$ and make sure the line passes through or very close to this point.
Extend to cover the data
Draw the line across the full range of the x data, not just through a few middle points.
03
What you will learn
Know

Key facts

  • What a line of best fit is
  • The rule: passes through the mean point $(\bar{x}, \bar{y})$
  • How to read gradient and y-intercept from a graph
Understand

Concepts

  • Why the line must balance points above and below
  • How to calculate the mean point
  • What the gradient and y-intercept mean in context
Can do

Skills

  • Draw a line of best fit by eye
  • Read the equation $y = mx + b$ from a graph
  • Use the equation to predict y for a given x value
04
Key terms, lines of best fit
Line of best fitA straight line drawn to best represent the trend in a scatterplot, with roughly equal scatter above and below.
Mean point $(\bar{x}, \bar{y})$The point formed by the mean of x values and the mean of y values. Every line of best fit passes through this point.
Gradient ($m$)The steepness of the line, calculated as $\frac{\text{rise}}{\text{run}}$ between two points on the line.
y-intercept ($b$)The y value where the line crosses the y-axis (when $x = 0$).
Equation of the lineWritten as $y = mx + b$ where $m$ is the gradient and $b$ is the y-intercept.
05
Rules for drawing a line of best fit by eye
MS-S4 core

Drawing a line of best fit by eye requires following these rules:

  1. Calculate the mean point $(\bar{x}, \bar{y})$: find the mean of all x values and the mean of all y values. Plot this point.
  2. Draw a straight line through the mean point that follows the general trend of the data.
  3. Balance the points: Roughly half the points should be above the line and half below. The line should not have all points on one side.
  4. Extend the line to cover the full range of x values in the dataset.
  5. Ignore outliers when drawing, draw the line to fit the main cluster, not to include extreme points.
Important: The line does not have to pass through any specific data point. It passes through the mean point $(\bar{x}, \bar{y})$, which is often not a data point itself.

A line of best fit is drawn through the middle of a scatterplot so that roughly half the points fall above and half below. It must pass through the mean point (x̄, ȳ) and should minimise overall vertical distance from points.

Pause, copy the two line-of-best-fit rules: equal numbers of points above and below the line (or a balance of distances), and the line should pass through the mean point (x̄, ȳ) into your book.

Quick check: A line of best fit is drawn on a scatterplot of 10 points, 7 points are above the line and 3 are below. What should be done to improve it?

06
Reading the equation from the graph
MS-S4 core

Drawing a line of best fit by eye requires balancing points above and below the line and passing it through (or near) the point of means. Once the line is drawn, its equation y = a + bx is found by reading the y-intercept a directly from the vertical axis, then calculating the gradient b = rise/run using two clearly identified points on the line (not data points).

Once you have drawn the line, you can find its equation $y = mx + b$:

  1. Find the y-intercept ($b$): Read where the line crosses the y-axis.
  2. Find the gradient ($m$): Choose two clearly readable points on the line (not necessarily data points). Calculate $m = \dfrac{y_2 - y_1}{x_2 - x_1}$.
  3. Write the equation using your values of $m$ and $b$: $y = mx + b$.

Example: A line of best fit passes through (0, 30) and (5, 55). Reading the graph: y-intercept = 30, so $b = 30$. Gradient: $m = \dfrac{55-30}{5-0} = \dfrac{25}{5} = 5$. Equation: $y = 5x + 30$.

Tip: When reading gradient, choose two points on the line that are far apart (to reduce reading error) and that are clearly at grid intersections.

Read the equation of a line of best fit from its graph by identifying the y-intercept (where line crosses y-axis) and gradient (rise ÷ run between two clearly-read points). Express as y = a + bx.

Pause, copy the two-step equation-reading procedure: (1) read the y-intercept a from where the line crosses the y-axis; (2) calculate gradient b = rise ÷ run using two points on the line (not data points) into your book.

Which does NOT belong? Steps to find the equation of a line of best fit:

07
Using the equation to make predictions
MS-S4 core

With the equation y = a + bx in hand, a from the y-intercept and b = rise/run, predictions are straightforward: substitute the x-value into the equation and calculate y. The key caveat is range: substituting an x-value inside the data range (interpolation) gives a reliable prediction; substituting outside the range (extrapolation) may be unreliable because the trend may not continue.

Once you have the equation $y = mx + b$, you can predict y for any x value by substituting.

Example: The equation $y = 5x + 30$ relates study hours (x) to score (y). Predict the score for a student who studies 6 hours:

$y = 5(6) + 30 = 30 + 30 = 60$

The predicted score is 60%.

Reading directly from the graph: You can also read a prediction from the graph by drawing a vertical line from x = 6 up to the line of best fit, then reading across to the y-axis. This gives the same result as substituting into the equation.

Coming up in Lesson 7: Predictions made within the data range (interpolation) are more reliable than predictions outside the range (extrapolation). We will cover this in depth next lesson.

To make predictions using the equation of a line of best fit, substitute the known x-value into y = a + bx to find the predicted y. Reliability depends on whether the x-value falls within or outside the data range.

Pause, copy the prediction method (substitute x into y = a + bx), the interpolation vs extrapolation distinction, and the rule: predictions within the data range are more reliable than those outside it into your book.

Complete: The line of best fit must always pass through the $(\bar{x}, \bar{y})$, and should have roughly equal numbers of points it.

PROBLEM 1 · FIND THE MEAN POINT

Data: hours studied (x): 1, 2, 3, 4, 5 and score (y): 45, 55, 62, 74, 80. Find the mean point and confirm the line of best fit passes through it.

1
$\bar{x} = \frac{1+2+3+4+5}{5} = \frac{15}{5} = 3$
Add all x values and divide by the number of data points.
PROBLEM 2 · READ THE EQUATION FROM A GRAPH

A line of best fit crosses the y-axis at 20 and passes through the point (8, 60). Find the equation of the line.

1
y-intercept: the line crosses y-axis at 20, so $b = 20$.
The y-intercept is where x = 0 on the line.
PROBLEM 3 · PREDICT FROM THE EQUATION

The equation of the line of best fit for hours studied (x) vs score (y) is $y = 5x + 20$. Predict the score for a student who studies 7 hours.

1
Substitute $x = 7$: $y = 5(7) + 20 = 35 + 20 = 55$.
Replace x with the given value and calculate y.
09
Activity, lines of best fit

Data: daily temperature °C (x): 18, 22, 25, 28, 32 and ice-cream sales (y): 40, 60, 75, 90, 120.

  1. Calculate the mean point $(\bar{x}, \bar{y})$.
  2. A line of best fit passes through (18, 35) and (32, 125). Find the equation of this line.
  3. Use the equation to predict ice-cream sales on a 27°C day.
  4. Explain what the gradient means in this context.
auto-saved
10
Revisit your thinking

At the start you thought about how to position a line through scattered points. The answer involves two principles: (1) the line must pass through the mean point $(\bar{x}, \bar{y})$, and (2) roughly equal numbers of points should be above and below the line. This balances the "errors" on each side, making the line a fair summary of the trend.

auto-saved
01
Multiple choice
+5 XP per correct · +25 XP all-correct

Pick your answer, then rate your confidence. Each retry pulls a fresh mix from the bank.

02
Short answer
ApplyBand 33 marks

Q1. A line of best fit for a scatterplot of advertising spend (x, $000s) vs sales (y, $000s) passes through (2, 35) and (6, 55). (a) Calculate the gradient. (b) Find the y-intercept. (c) Write the equation of the line. (3 marks)

auto-saved
UnderstandBand 32 marks

Q2. Explain why a line of best fit must pass through the mean point $(\bar{x}, \bar{y})$. (2 marks)

auto-saved
Answers (click to reveal)

Activity: (1) $\bar{x} = (18+22+25+28+32)/5 = 125/5 = 25$; $\bar{y} = (40+60+75+90+120)/5 = 385/5 = 77$. Mean point: (25, 77). (2) $b = $ y when x=18: using gradient first, $m = (125-35)/(32-18) = 90/14 \approx 6.43$. Then $b = 35 - 6.43 \times 18 \approx 35 - 115.7 = -80.7 \approx -81$. Equation: $y \approx 6.4x - 81$. (3) $y = 6.4(27) - 81 = 172.8 - 81 = 91.8 \approx 92$ sales. (4) Gradient $\approx 6.4$ means for each 1°C increase in temperature, ice-cream sales increase by approximately 6.4 units.

Q1 (3 marks): (a) $m = \frac{55-35}{6-2} = \frac{20}{4} = 5$ [1]. (b) $35 = 5(2) + b \Rightarrow b = 35-10 = 25$ [1]. (c) $y = 5x + 25$ [1].

Q2 (2 marks): The mean point represents the "centre of gravity" of the data [1]. A line through the mean point balances the total scatter above and below, making it the best single linear summary of the data [1].

01
Boss battle · Best Fit Builder
earn bronze · silver · gold

Draw lines, find equations, and make predictions. Beat the boss to bank a tier. Replays welcome.

⚔ Arena coming soon
02
Science Jump · platform challenge

Climb platforms answering lines-of-best-fit questions. Pool: lesson 05.

Mark lesson as complete

Tick when you've finished the practice and review.