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 8 ~30 min MST-12-S2-08 ⚡ +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
1

Orient to lines of best fit

Connect scatter, balance and the purpose of a fitted line.

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.
2

Draw a line by eye

Balance the scatter and avoid forcing the line through every point.

05
Rules for drawing a line of best fit by eye
MST-12-S2-08 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 must 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?

3

Read the line equation

Connect gradient and intercept to the fitted graph.

06
Reading the equation from the graph
MST-12-S2-08 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:

4

Predict from the line

Substitute predictor values and interpret fitted values in context.

07
Using the equation to make predictions
MST-12-S2-08 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.

5

Use digital tools

Construct the same fitted line with technology and compare results.

08
The same line, drawn with digital tools
MST-12-S2-08 core

Drawing by eye is a judgement, and judgements differ. Hand the same scatterplot to five students and you get five slightly different lines, all of them defensible. The syllabus asks you to produce the line both ways, by eye and with digital tools, precisely so you can see what changes when the judgement is taken out.

Take the paid work hours ($x$) and exam mark ($y$) of eight students:

Work hours ($x$)035810121519
Exam mark ($y$)8976838274696950

In a spreadsheet. Put $x$ in column A and $y$ in column B, select both columns, then Insert a Scatter chart. With the chart selected, add a Trendline , choose Linear , and tick Display equation on chart . The equation appears as $y = -1.7x + 89.3$ .

In a graphing application. Desmos and GeoGebra both take the pairs as a two-column table, then fit a line on request. The equation they return for this data is the same one, written in whichever order that tool prefers.

Notice what happened. Your by-eye line was one reasonable line among many ; the digital line is the same line every time, for every student, on every device . That reproducibility is the whole reason the exam asks for both.

The check that catches a data-entry error. Card 05 said a line of best fit must pass through the mean point $(\bar{x}, \bar{y})$ . That rule does not stop applying because a machine drew the line. Here $\bar{x} = 9$ and $\bar{y} = 74$ , and substituting gives $-1.7 \times 9 + 89.3 = -15.3 + 89.3 = 74$ . It passes exactly. If your trendline misses your own mean point, the fault is in the data you typed, not the tool.
Do not over-claim. A trendline is still only a line of best fit. It does not become more true because software produced it, and it carries every limitation you already know: it describes a linear pattern only, it is pulled about by outliers, and it says nothing about cause.

The line the software returns has a proper name, the least-squares regression line , and Lesson 6 shows you what it is minimising and how to produce it on the calculator you take into the exam.

A line of best fit can be produced by eye or with digital tools. In a spreadsheet, insert a scatter chart, add a linear trendline and display its equation; a graphing app fits the same line from a table of pairs. The by-eye line differs between students, the digital line does not. Both must pass through the mean point (x̄, ȳ).

Pause, copy the spreadsheet route: scatter chart, then linear trendline, then display equation, and copy the mean-point check that applies to a digital line just as it does to a hand-drawn one.

True or false: Two students draw a line of best fit by eye on the same scatterplot and get slightly different equations. At least one of them must have made an error.

6

Apply lines of best fit

Work examples, draw fitted lines and revisit the opening estimate.

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, 119). 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
7

Answer best-fit questions

Draw, interpret and use fitted lines in short-answer questions.

02
Short answer
ApplyBand 33 marks

Q1. A line of best fit for a scatterplot of advertising spend (x, $\$000$s) vs sales (y, $\$000$s) 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) Gradient first: $m = \frac{119-35}{32-18} = \frac{84}{14} = 6$. Then using $(18, 35)$: $35 = 6(18) + b$, so $b = 35 - 108 = -73$. Equation: $y = 6x - 73$. Check it against part (1): at $x = 25$, $y = 6(25) - 73 = 150 - 73 = 77 = \bar{y}$, so the line passes through the mean point $(25, 77)$ as it must. (3) $y = 6(27) - 73 = 162 - 73 = 89$ sales. (4) The gradient $6$ means that for each $1$°C increase in temperature, ice-cream sales increase by about $6$ 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].