Scatter diagrams
Bivariate data come in pairs \((x, y)\), such as hours studied and test score. Plot them as a scatter diagram and describe what you see:
- Direction: positive (both rise together) or negative (one rises as the other falls).
- Strength: how closely the points follow a straight line.
- Form: linear or not, and any outliers.
A line of best fit drawn by eye should pass through the mean point \((\bar{x}, \bar{y})\), with roughly equal numbers of points above and below.
Pearson's correlation coefficient
Pearson's \(r\) measures the strength of a linear relationship. It is always between \(-1\) and \(1\):
| $ | r | $ | Rough description |
|---|---|---|---|
| close to 0 | no linear correlation | ||
| about 0.25 to 0.5 | weak | ||
| about 0.5 to 0.75 | moderate | ||
| above about 0.75 | strong |
The sign gives the direction. \(r = 1\) or \(-1\) means all points lie exactly on a line. In this course \(r\) is found with the GDC.
Correlation is not causation. Ice-cream sales and sunburn cases correlate strongly because both depend on hot weather, not because one causes the other.
Regression line of y on x
The GDC's linear regression gives the least-squares line \(y = ax + b\), which minimises the squared vertical distances from the points. It always passes through \((\bar{x}, \bar{y})\). It is designed to predict \(y\) from \(x\); do not rearrange it to predict \(x\) from \(y\).
Interpreting the parameters
- Gradient \(a\): the average change in \(y\) for each one-unit increase in \(x\).
- Intercept \(b\): the predicted \(y\) when \(x = 0\), which only makes sense if \(x = 0\) is realistic.
Worked example
Eight students' study hours \(x\) and test scores \(y\) give the regression line \(y = 4.2x + 51\) with \(r = 0.91\).
- Strong positive linear correlation.
- Each extra hour of study is associated with about 4.2 more marks on average.
- 51 is the predicted score for a student who did not study at all.
- If the data covered 1 to 9 hours, predicting for 6 hours gives \(4.2(6) + 51 = 76.2\), which is reliable (interpolation, strong \(r\)). Predicting for 25 hours gives 156, impossible on a 100-mark test: this is extrapolation and should not be trusted.
When is a prediction reliable?
- \(|r|\) is fairly large (strong correlation).
- The \(x\)-value is within the range of the data.
- You are predicting \(y\) from \(x\) with the \(y\)-on-\(x\) line.
GDC tips
- Enter \(x\) and \(y\) in two lists, run linear regression (\(ax + b\)), and switch on the display of \(r\) (diagnostics) if needed.
- Store the regression equation as a function to evaluate predictions directly.
Common mistakes
- Describing \(r = -0.8\) as weak because it is negative.
- Claiming one variable causes the other.
- Using the line outside the data range without comment.
- Interpreting the gradient without units or context.
Exam tips
- Give \(a\), \(b\) and \(r\) to 3 significant figures unless told otherwise.
- "Interpret" means explain in context: use the variable names and units.
- If asked whether a prediction is valid, refer to both the strength of \(r\) and interpolation versus extrapolation.