Home / Correlation & Regression / The Regression Line
3.7b · Correlation & Regression · Sub-skill
Fitting a line of best fit to a scatter graph, and understanding what the gradient and intercept of a regression line mean.
Build it up, step by step
Click each step below to reveal it — work through them in order the first time round.
A regression line (line of best fit) is a straight line drawn through a scatter graph that best represents the linear trend in the data. It's written in the form $y=a+bx$.
In the exam, you'll typically use your calculator's statistical mode to find the equation of the regression line directly from raw data (giving you the values of $a$ and $b$), rather than deriving it by hand. You need to be able to interpret and use the equation once found.
The gradient, $b$, tells you how much $y$ changes for every 1 unit increase in $x$. The intercept, $a$, tells you the predicted value of $y$ when $x=0$ — though this may not always be meaningful in context (e.g. if $x=0$ is outside the sensible range of the data).
The regression line always passes through the mean point, $(\bar{x},\bar{y})$ — the point representing the mean of the x-values and the mean of the y-values. This is a useful fact for checking or sketching a regression line by hand.
A regression line for predicting exam score (y) from hours revised (x) is $y=42+5x$. Interpret the gradient and the intercept.
Gradient (5): for every extra hour of revision, exam score is predicted to increase by 5 marks.
Intercept (42): a student who revises for 0 hours is predicted to score 42 marks — though this may not be very meaningful if the data collected didn't actually include students with 0 hours of revision.
Test yourself
The regression line for predicting monthly heating cost, y (£), from average outdoor temperature, x (°C), is $y=150-4x$.
(a) Interpret the gradient of this regression line in context.
(b) Use the regression line to predict the heating cost when the average temperature is 8°C. [4 marks]
(a) The gradient (−4) means that for every 1°C increase in average outdoor temperature, the predicted monthly heating cost decreases by £4 — sensible, since warmer weather needs less heating.
(b) y = 150 − 4(8) = 150 − 32 = £118.
Practice
Five short questions on the regression line. Work through them, then reveal the mark scheme to check.