4.4 Correlation and linear regression
Studying this course? Keep your progress in one place.
Key facts
- Correlation describes linear association: positive, negative or zero, and strong or weak.
- Pearson's lies between and ; it only measures linear correlation.
- Correlation does not imply causation; a third variable may explain it.
- The regression line passes through ; is the change in per unit of .
- Prediction inside the data range is interpolation; outside is unreliable extrapolation.
Scatter diagrams and correlation
Correlation describes the direction and strength of the linear association between two variables.
Bivariate data are pairs , plotted as a scatter diagram. Correlation describes the linear association: positive, negative or zero.
It is strong if the points lie close to a straight line and weak if widely scattered. A curved pattern can be strong without being linear.
Take and : the points rise with , a strong positive correlation.
| Positive | Negative | Zero | |
|---|---|---|---|
| As x increases, y | Tends to increase | Tends to decrease | No linear pattern |
| Example | Revision time and score | Age of a car and value | Shoe size and score |
Positive
- As x increases, y:
- Tends to increase
- Example:
- Revision time and score
Negative
- As x increases, y:
- Tends to decrease
- Example:
- Age of a car and value
Zero
- As x increases, y:
- No linear pattern
- Example:
- Shoe size and score
As increases, tends to decrease. What correlation is this?
Pearson's coefficient
Pearson's measures the strength and direction of linear correlation, between and .
Pearson's product-moment correlation coefficient satisfies . is perfect positive, perfect negative and no linear correlation. As a guide, near is strong, about moderate and near weak.
Use your GDC. If exceeds the critical value for the sample size, the correlation is significant.
For the data above, : strong positive linear correlation. A strong curve can still give near .
Which value of shows the strongest linear correlation?
Correlation and causation
No: a strong correlation shows association only, and a third variable or coincidence may explain it.
Correlation does not imply causation. Two variables may move together because of a third variable (ice-cream sales and sunburn both rise in hot weather), or by coincidence.
A causal claim needs more evidence than a high . When asked to comment, say the data show an association and name a plausible third variable if you can.
- 1
Hot weather
the hidden cause
- 2
More ice cream sold
and more sunburn
- 3
Strong correlation
but neither causes the other
Shoe size and reading score are strongly correlated in primary pupils. Best comment?
Regression line
The regression line of on is the best-fit line; its gradient and intercept have a meaning in context.
Draw a line of best fit by eye with about half the points each side, through the mean point . For the data above the mean point is .
The regression line of on , , comes from your GDC. It minimises the squares of the vertical distances and passes through .
- is the average change in per unit increase in
- is the predicted when (it may make no sense if is outside the data)
Here , so each extra unit of goes with more units of . Check: .
In , what does 1.2 mean?
Prediction
Predictions inside the range of the data are reasonably reliable; outside it they are not.
Predict by substituting into the regression line.
A prediction within the data range is interpolation and is reasonably reliable if is high. A prediction outside the range is extrapolation and is unreliable: the trend may not continue.
The line of on is for predicting from . To estimate from a given , use the regression line of on .
Worked example
Use (data for to ) to predict when and when . Comment on each.
- 1
: .
- 2
is inside the data range : interpolation, fairly reliable.
- 3
: .
- 4
is outside the range: extrapolation, unreliable.
Data cover to . Predicting at is...
Try an exam question
For the regression line of on is and . Interpret the gradient, predict when , and comment on the reliability of a prediction at .
[4 marks]
- [1]For each unit increase in , increases by on average.
- [1].
- [1] is outside the data range , so it is extrapolation.
- [1]The prediction is unreliable even though is high, because the trend may not continue.
That's the notes covered.
Carry on to the next subtopic.
Try a question
Which best describes the correlation between and ?
1 mark, marked against the mark scheme
Which best describes the correlation between and ?
1 mark, marked against the mark scheme