Scatter diagrams and linear regression
Studying this course? Keep your progress in one place.
Key facts
- A scatter diagram shows direction, strength and whether the pattern is linear; the explanatory variable goes on the horizontal axis.
- The least squares line is with and ; it passes through .
- Interpret as the change in per unit increase in , in context, using the word 'predicted'.
- Interpolation (inside the data range) is usually reliable; extrapolation may not be.
- If the data are coded, substitute back to give the line in the original variables.
Scatter diagrams and variables
A scatter diagram plots paired data to show direction, strength and whether the relationship is linear. The explanatory variable goes on the horizontal axis.
A scatter diagram plots paired data and shows whether there is a relationship between two variables.
Look for the direction (positive or negative), the strength (how closely points follow a line) and whether the pattern is roughly linear.
The explanatory variable is controlled or used to explain. The response variable is the one being predicted. Other letters may be used, such as for temperature or for sales.
Explanatory variable
- Controlled or used to explain
- Horizontal axis
Response variable
- The one being predicted
- Vertical axis
In a study of fertiliser and plant height, which is the explanatory variable?
The least squares regression line
The least squares line has gradient and passes through the mean point.
The regression line of on is . It is the least squares line: the one that makes the sum of the squared vertical distances from the points to the line as small as possible. Derivations are not required.
Use and .
The line always passes through , so you can draw it by plotting that point and one other.
- Gradient
- Intercept
Worked example
, , , , . Find the regression line of on .
- 1
.
- 2
, so .
- 3
and , so .
A regression line has , and . What is ?
Interpreting the line
The gradient is the change in the response per one-unit increase in ; the intercept is the predicted response at , which may have no meaning.
Always interpret in the context of the question.
The gradient is the change in the response for each one-unit increase in the explanatory variable. The intercept is the predicted response when . It only has meaning if is sensible and within the data.
Regression of on is for predicting from . It should not be rearranged to predict from .
- Gradient change in per 1 unit of
- Intercept predicted when
Worked example
Daily sales (pounds) against temperature (°C) give . Interpret the gradient.
- 1
The gradient is , the change in for each 1 unit increase in .
- 2
Name the variables and units, and say 'predicted'.
When does the intercept have a sensible meaning?
Interpolation and extrapolation
Predictions inside the range of the data are usually reliable; predictions outside it may be unreliable.
Substitute a value of into the regression line to predict .
A model fitted for temperatures 12 °C to 28 °C should not be used at 5 °C. A good answer says the value is outside the range, so it is extrapolation, and the relationship may not continue.
For a 'comment on reliability' question, state the range of the data, say whether the value is inside it, and name interpolation or extrapolation.
Interpolation
- inside the range of the data
- Usually reliable
Extrapolation
- outside the range of the data
- May be unreliable: the linear relationship may not continue
A line is fitted using from 12 to 28. Predicting at is...
Linear change of variable (coding)
Find the line in the coded variable as usual, then substitute the coding to convert back to the original variables.
Data are sometimes coded, for example , to make the numbers smaller.
A regression line of on can be found as usual, then converted back by substituting the coding. The gradient is divided by the coding factor.
Remember to give the final line in the original variables, and interpret the gradient with the original units.
- Coding
- Line in
- Line in
Worked example
with . Find in terms of .
- 1
Substitute: .
- 2
, so .
- 3
Expand: .
If and , the gradient of on is...
Try an exam question
For pairs of data, , , and . Find the equation of the regression line of on in the form .
[5 marks]
- [1].
- [1].
- [1].
- [1].
- [1].
That's the notes covered.
Carry on to the next subtopic.
Try a question
Find the value of .
1 mark, marked against the mark scheme
Find the value of .
1 mark, marked against the mark scheme