Line of Best Fit (SQA National 5 Maths): Revision Note

Exam code: X847 75

Roger B

Written by: Roger B

Reviewed by: Dan Finlay

Updated on

Finding the equation of the line of best fit

What is a scattergraph?

  • Scattergraphs (sometimes called scatter diagrams or scatter plots) are used to plot pairs of data

    • For example, students' Maths grades against their Physics grades

  • The vertical and horizontal axes represent the two quantities being measured

  • Points are plotted as dots, •

    • They are not joined up

What is a line of best fit?

  • A line of best fit is a straight line drawn through a scattergraph

    • It shows the overall direction of the data

    • It represents the best estimate of the relationship between the two variables

  • In the exam, the line of best fit will be drawn for you on a scattergraph

    • You will need to find the equation of the line

    • The equation can then be used to estimate values for other data pairs

How do I find the equation of a line of best fit on a scattergraph?

  • In the exam, you will know the coordinates of two points on a scattergraph that lie on the line of best fit

    • You may be told the coordinate values in the context of the question

      • For example, "point A represents a student with a Maths score of 79 and a Physics score of 83"

    • Or you may be able to read the values off the grid on which the scattergraph is plotted

  • With the coordinates of those two points, use the usual method for finding the equation of a line

    • Start by finding the gradient

      • Then use Error converting from MathML to accessible text. to find the equation of the line

    • Use the variables that are defined in the question

      • These may not be x and y

Examiner Tips and Tricks

Be careful to get the coordinates for the 'x-variable' (variable on the horizontal axis) and 'space y-variable' (variable on the vertical axis) the right way round!

Estimating values using a line of best fit

  • Once you know the equation of the line of best fit you can use it to

    • estimate values of the 'bold italic y-variable' (the variable on the vertical axis)

    • that correspond to values of the 'bold italic x-variable' (the variable on the horizontal axis)

  • To find an estimate

    • Substitute the value of the x-variable into the equation of the line of best fit

    • and work out the value of the corresponding space y-variable

Examiner Tips and Tricks

Remember that a value worked out this way is only an estimate.

Worked Example

A local wildlife trust monitors the success of a new conservation area by recording the number of breeding pairs of a specific rare bird species over time.

The scattergraph shows the relationship between the time since the conservation area was established (T years) and the Number of breeding pairs (N).

Graph showing a line with data points, illustrating the number of breeding pairs over time. Points are labelled A and B along the line.

A line of best fit has been drawn.

Point A represents 14 breeding pairs recorded 5 years after the conservation area was established.

Point B represents 34 breeding pairs recorded 15 years after the conservation area was established.

(a) Find the equation of the line of best fit in terms of N and T. Give the equation in its simplest form.

No record was made of the number of breeding pairs 9 years after the establishment of the conservation area.

(b) Use your equation from part (a) to estimate the number of breeding pairs expected after 9 years.

Answer:

Part (a)

Use the information in the question to identify the coordinates of points A and B

  • T is the 'x-variable' (variable on the horizontal axis)

  • N is the 'space y-variable' (variable on the vertical axis)

straight A open parentheses 5 comma space 14 close parentheses space space and space space straight B open parentheses 15 comma space 34 close parentheses

Find the gradient of the line between those two points

m equals fraction numerator 34 minus 14 over denominator 15 minus 5 end fraction equals 20 over 10 equals 2

Substitute the gradient and coordinates into space y minus b equals m stretchy left parenthesis x minus a stretchy right parenthesis and simplify

  • Remember to use N instead of space y and T instead of x

  • Using point open parentheses 5 comma space 14 close parentheses as the point on the line gives a equals 5 comma space b equals 14

N minus 14 equals 2 stretchy left parenthesis T minus 5 stretchy right parenthesis

Expand the brackets and simplify

table row cell N minus 14 end cell equals cell 2 T minus 10 end cell row N equals cell 2 T minus 10 plus 14 end cell row N equals cell 2 T plus 4 end cell end table

N equals 2 T plus 4

Part (b)

Substitute T equals 9 into the equation and find the corresponding value of N

table row N equals cell 2 open parentheses 9 close parentheses plus 4 end cell row blank equals cell 18 plus 4 end cell row blank equals 22 end table

22 breeding pairs

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Roger B

Author: Roger B

Expertise: Maths Content Creator

Roger's teaching experience stretches all the way back to 1992, and in that time he has taught students at all levels between Year 7 and university undergraduate. Having conducted and published postgraduate research into the mathematical theory behind quantum computing, he is more than confident in dealing with mathematics at any level the exam boards might throw at you.

Dan Finlay

Reviewer: Dan Finlay

Expertise: Maths Subject Lead

Dan graduated from the University of Oxford with a First class degree in mathematics. As well as teaching maths for over 8 years, Dan has marked a range of exams for Edexcel, tutored students and taught A Level Accounting. Dan has a keen interest in statistics and probability and their real-life applications.