Scatter Plots & Line of Best Fit
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.
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.
Every line of best fit is written in gradient–intercept form:
Read \(c\) where the line meets the \(y\)-axis, and find the gradient from two points on the line:
How to fit and use a line of best fit
- Describe the scatter: direction (positive/negative), strength (strong/moderate/weak) and form (linear/non-linear).
- Draw one straight line by eye that follows the trend, balancing points above and below (only if roughly linear).
- Read the \(y\)-intercept \(c\) where the line crosses the \(y\)-axis.
- Find the gradient \(m=\dfrac{\text{rise}}{\text{run}}\) from two points on the line.
- Write \(y=mx+c\) and use it to predict by substituting a value.
Read \(c\) at the \(y\)-axis, find \(m\) from the two points, then combine.
| \(c\) | \(=\) | \(4\) |
| \(m\) | \(=\) | \(\dfrac{12-4}{4-0}=\dfrac{8}{4}=2\) |
| \(\therefore\ y\) | \(=\) | \(2x+4\) |
Comment on direction, strength and form, then check the line balances the points.
| \(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.
The gradient is the change per km; substitute \(d=10\) to predict.
| \(F\) | \(=\) | \(3d+5\) |
| \(F\) | \(=\) | \(3(10)+5\) |
| \(\) | \(=\) | \(35\) |
(i) The fare rises by about \(\$3\) per km. (ii) A \(10\) km trip costs about \(\$35\).
Read \(c\), find the (negative) gradient, then substitute \(m=10\).
| \(c\) | \(=\) | \(80\) |
| \(m\) | \(=\) | \(\dfrac{20-80}{20-0}=-3\) |
| \(T\) | \(=\) | \(-3m+80\) |
| \(T\) | \(=\) | \(-3(10)+80=50\) |
About \(50^\circ\)C after \(10\) minutes.
Common pitfalls
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).