Resources For Teachers For Tutors For Students & Parents Pricing
Year 12 Maths Standard 2 (2027) Bivariate data analysis

Scatter Plots & Line of Best Fit

20 practice questions 0 video lessons Theory + worked examples

Master the line of best fit for NSW Year 12 Mathematics Standard 2. In this topic you read a scatter plot, describe its direction, strength and form, and draw a straight line of best fit by eye through the middle of the points.

You will learn to read the gradient and y-intercept of the line, write its equation in the form \(y=mx+c\), and use the line of best fit to make predictions — a core Standard 2 skill for modelling real-world bivariate data.

Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

A scatter plot shows bivariate data as points, and a line of best fit is a straight line drawn by eye through their middle. This Year 12 Standard 2 (NSW) guide shows how to describe the direction, strength and form of a scatter, read the gradient and y-intercept, write the equation \(y=mx+c\), and use the line to make predictions.

A scatter plot graphs bivariate data as points, one per pair of readings. A line of best fit is a single straight line drawn by eye through the middle of those points to model the overall trend.

First describe the scatter by its direction (positive or negative), strength (strong, moderate or weak) and form (linear or non-linear). A straight line of best fit only makes sense when the form is roughly linear.

The line's equation \(y=mx+c\) summarises the relationship: \(c\) is the y-intercept (the value of \(y\) when \(x=0\)) and \(m\) is the gradient. Substituting a value into the equation gives a prediction.

Line of best fit through a scatter plotPoints rising with a red line of best fit y=2x+2 balancing them. x y 1 2 3 4 5 6 7 8 2 6 10 14 18
The line balances the points: it crosses the \(y\)-axis at \(2\) and has gradient \(2\).
Scatter plot with a negative trendPoints falling from upper-left to lower-right with a red line of best fit. x y 2 4 6 8 10 12 2 4 6 8 10 12 14
A falling trend gives a negative gradient.

Every line of best fit is written in gradient–intercept form:

\[y = mx + c\]
y=mx+c

Read \(c\) where the line meets the \(y\)-axis, and find the gradient from two points on the line:

\[m = \frac{\text{rise}}{\text{run}} = \frac{y_2 - y_1}{x_2 - x_1}\]
m=y2-y1x2-x1
Prediction. Substitute a known \(x\)-value into \(y=mx+c\) to estimate \(y\) (or set \(y\) and solve for \(x\)).

How to fit and use a line of best fit

  1. Describe the scatter: direction (positive/negative), strength (strong/moderate/weak) and form (linear/non-linear).
  2. Draw one straight line by eye that follows the trend, balancing points above and below (only if roughly linear).
  3. Read the \(y\)-intercept \(c\) where the line crosses the \(y\)-axis.
  4. Find the gradient \(m=\dfrac{\text{rise}}{\text{run}}\) from two points on the line.
  5. Write \(y=mx+c\) and use it to predict by substituting a value.
Example 1 — Read c and m, write the equation
The red line of best fit passes through \((0,4)\) and \((4,12)\). Write down its \(y\)-intercept and gradient, then give the equation.
Solution

Read \(c\) at the \(y\)-axis, find \(m\) from the two points, then combine.

Example 1Red line of best fit through (0,4) and (4,12); equation y=2x+4. x y 1 2 3 4 5 6 7 8 4 8 12 16 20
\(c\)\(=\)\(4\)
\(m\)\(=\)\(\dfrac{12-4}{4-0}=\dfrac{8}{4}=2\)
\(\therefore\ y\)\(=\)\(2x+4\)
y=2x+4
Example 2 — Describe and judge the fit
The scatter plot shows hours of sunshine \(h\) and the energy \(E\) (kWh) a solar panel makes, with a red line of best fit. Describe the relationship and say whether the line is a good fit.
Solution

Comment on direction, strength and form, then check the line balances the points.

Example 2Energy rises with sunshine hours; points cluster tightly about the line. h E 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12
\(h\uparrow\)\(\Rightarrow\)\(E\uparrow\ \text{(positive)}\)
\(\text{close to a line}\)\(\Rightarrow\)\(\text{strong, linear}\)

The line follows the trend with about half the points above and half below — a good line of best fit.

Example 3 — Interpret and predict
A taxi's fare \(F\) (\(\$\)) is recorded against distance \(d\) (km). The line of best fit is \(F=3d+5\). (i) What does the gradient of \(3\) mean? (ii) Predict the fare for a \(10\) km trip.
Solution

The gradient is the change per km; substitute \(d=10\) to predict.

Example 3Taxi fare against distance with line of best fit F=3d+5. d F 2 4 6 8 10 12 5 15 25 35 45
\(F\)\(=\)\(3d+5\)
\(F\)\(=\)\(3(10)+5\)
\(\)\(=\)\(35\)
F=35

(i) The fare rises by about \(\$3\) per km. (ii) A \(10\) km trip costs about \(\$35\).

Example 4 — Equation and prediction (falling)
A cup of coffee cools; its temperature \(T\) (\(^\circ\)C) is measured each minute \(m\). The line of best fit passes through \((0,80)\) and \((20,20)\). Write its equation and predict \(T\) after \(10\) minutes.
Solution

Read \(c\), find the (negative) gradient, then substitute \(m=10\).

Example 4Coffee temperature falling over time; line of best fit T=-3m+80. m T 4 8 12 16 20 20 40 60 80
\(c\)\(=\)\(80\)
\(m\)\(=\)\(\dfrac{20-80}{20-0}=-3\)
\(T\)\(=\)\(-3m+80\)
\(T\)\(=\)\(-3(10)+80=50\)
T=50

About \(50^\circ\)C after \(10\) minutes.

Common pitfalls

Balance, don't connect. The line of best fit is one straight line through the middle of the cloud — never a zig-zag joining the dots, and it need not touch any point.
Use points on the line. Read the gradient and intercept from the line itself, using two points it clearly passes through, not from scattered data points.
Keep the sign. A downward (negative) trend has a negative gradient — write \(y=-3x+80\), not \(y=3x+80\).

Frequently asked questions

How do you draw a line of best fit by eye?

Draw one straight line that follows the overall trend of the points, with roughly as many points above the line as below it. It does not have to touch any of the data points; it just balances them.

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

Read the y-intercept c where the line crosses the y-axis, then find the gradient m as rise over run using two points on the line. Put them together as y = mx + c.

What is the difference between the gradient and the y-intercept?

The y-intercept is the value of y when x equals 0, where the line meets the vertical axis. The gradient is how much y changes for each 1-unit increase in x.

How do you use a line of best fit to make a prediction?

Substitute the given x-value into the equation y = mx + c to estimate the matching y-value. If you are given a y-value instead, put it in and solve for x.

What do direction, strength and form mean for a scatter plot?

Direction is whether the trend rises (positive) or falls (negative). Strength is how tightly the points cluster about a line (strong, moderate or weak). Form is whether the pattern is a straight line (linear) or a curve (non-linear).

Does the line of best fit have to pass through the origin or the data points?

No. It only needs to follow the overall trend and balance the points above and below it. It can miss every single data point and need not pass through the origin (0,0).