4.4 Correlation and regression of y on x
Studying this course? Keep your progress in one place.
Key facts
- Use technology for and for the line .
- Describe correlation by direction (positive or negative) and strength (strong or weak), in context.
- measures linear correlation only; correlation does not imply causation.
- The regression line passes through , so substitute to get .
- Interpret as the change per unit of and as the value at . Predict from only, and avoid extrapolation.
Scatter diagrams
The direction and strength of the relationship between two variables.
Bivariate data are pairs measured on the same items. A scatter diagram can show positive correlation, negative correlation, or none. Correlation is strong when points lie close to a straight line and weak when scattered.
A line of best fit by eye should pass through the mean point , with roughly equal numbers of points on each side.
Positive
- y tends to increase as x increases
Negative
- y tends to decrease as x increases
Zero
- No linear pattern
A scatter diagram shows points tightly clustered round a line sloping downwards. How is the correlation described?
Pearson's correlation coefficient
measures the strength and direction of a linear relationship, from to .
Pearson's product-moment correlation coefficient measures the strength and direction of a linear relationship. It is found with technology and satisfies .
- close to 1: strong positive linear correlation; close to : strong negative.
- close to 0: little or no linear correlation.
When a question gives a critical value, the correlation is significant if is larger than it. is only meaningful for linear relationships.
Strong
Moderate
Weak
A set of data has . What does this show?
Correlation is not causation
No: the variables may both depend on a third variable, or the link may be a coincidence.
A strong correlation shows that two variables move together, not that one causes the other.
The link may come from a third variable affecting both (hot weather increases both ice cream sales and sunburn), or be a coincidence.
In exam comments, say correlation does not imply causation and name a plausible third factor in context.
- 1
Hot weather
the third variable
- 2
More ice cream sold
one effect
- 3
More sunburn
another effect, so the two correlate
Ice cream sales and sunburn cases are strongly positively correlated. What is the best comment?
The regression line of y on x
The line passes through ; is the change per unit of and the value at .
The regression line of on , , is found with technology: it minimises the sum of squared vertical distances to the points. It always passes through .
- (the gradient) is the change in per 1 increase in . For (price against age), the price falls by about 1850 dollars per year.
- (the -intercept) is the predicted when ; only meaningful if that makes sense.
Give coefficients to 3 s.f., but use unrounded values for later predictions.
Worked example
A car's price in dollars is modelled by , where is its age in years. Predict the price of a 4-year-old car and interpret the gradient.
- 1
Substitute : .
- 2
.
- 3
The gradient is negative: each extra year of age reduces the price.
The regression line of on is and . What is ?
Making predictions safely
Inside the data range with a strong correlation; never outside it, and never to predict from .
Interpolation predicts inside the data range and is reliable if the correlation is strong. Extrapolation predicts outside it and is unreliable, because the linear pattern may not continue (a revision line predicting 130 out of 100 is an obvious example).
A on line should only be used to predict from . Rearranging it to predict from is not valid. A prediction is also unreliable if is small.
| Interpolation | Extrapolation | |
|---|---|---|
| Where | Inside the data range | Outside the data range |
| Reliability | Reliable if correlation is strong | Unreliable: pattern may not continue |
Interpolation
- Where:
- Inside the data range
- Reliability:
- Reliable if correlation is strong
Extrapolation
- Where:
- Outside the data range
- Reliability:
- Unreliable: pattern may not continue
Data for x between 5 and 20 give a strong correlation. Which prediction is most reliable?
Try an exam question
For data with between 5 and 20, the regression line of on is , the mean of is 10 and . (a) Describe the correlation. (b) Find the mean of . (c) Explain why using the line to predict when is unreliable.
[4 marks]
- [1]There is a strong linear correlation, since .
- [1]The correlation is positive, since .
- [1].
- [1] is outside the data range, so this is extrapolation and the pattern may not continue.
That's the notes covered.
Carry on to the next subtopic.
Try a question
Use the regression line to estimate the selling price of a 5-year-old car.
1 mark, marked against the mark scheme
Use the regression line to estimate the selling price of a 5-year-old car.
1 mark, marked against the mark scheme