IB MYP Mathematics · Statistics and probability
Scatter graphs and correlation
1Bivariate data and plotting
Bivariate data record two measurements for each individual, such as the height and mass of each person, or the hours of revision and test score of each student.
A scatter graph (scatter diagram) plots one variable against the other. Each individual is one point.
- Put the independent (explanatory) variable on the horizontal axis: the one you think affects the other.
- Put the dependent (response) variable on the vertical axis.
- Plot each pair as a cross or dot. Do not join the points.
- Label both axes with the variable and its units, and choose scales that spread the points over the grid.
Setting up
- Data: hours of revision and test score for ten students.
- Revision time probably affects the score, so hours go on the horizontal axis and score on the vertical.
- A student who revised for 4 hours and scored 62 is plotted at (4, 62).
The purpose is to see whether the two variables are related, and how.
Check yourself
On a scatter graph of temperature and ice cream sales, which variable goes on the horizontal axis?
Show the answer
Temperature
Temperature is the independent variable: it affects sales.
2Describing correlation
Correlation describes the relationship shown by the pattern of points.
- Positive correlation: as one variable increases, the other tends to increase. The points slope up from left to right.
- Negative correlation: as one increases, the other tends to decrease. The points slope down.
- No correlation: no pattern; the points are scattered at random.
The strength depends on how close the points lie to a straight line.
- Strong: the points are close to a line.
- Weak: the points are loosely scattered around a line.
Strong positive correlation: the points lie close to a rising line
A full description has three parts: strength, direction, and a sentence in context. "There is a strong positive correlation: students who revised for longer tended to score higher."
Examples: height and shoe size (positive); the age of a car and its value (negative); a person's house number and their height (none).
Check yourself
As the age of a car increases, its value tends to fall. What type of correlation is this?
Show the answer
Negative
One variable increases while the other decreases.
3The line of best fit
If the points show a linear pattern, draw a line of best fit: a single straight line that follows the trend.
- Draw it with a ruler.
- It should have roughly the same number of points on each side.
- It should pass through the mean point $(\bar{x}, \bar{y})$: the mean of the $x$ values and the mean of the $y$ values.
- It does not have to pass through the origin, or through any of the data points.
- Ignore clear outliers when judging its position.
The mean point
- Five students revised for 2, 3, 5, 6 and 9 hours and scored 48, 55, 60, 71 and 86.
- Mean hours: 25 ÷ 5 = 5.
- Mean score: 320 ÷ 5 = 64.
- Plot the mean point (5, 64) and draw the line through it, balancing the other points.
The line can be described by an equation $y = mx + c$. Suppose it is $y = 5.5x + 36.5$. The gradient means each extra hour of revision goes with about 5.5 more marks. The intercept means a student who did no revision would be predicted to score about 36.5.
With technology (a graphing calculator or spreadsheet), the line is found exactly as the regression line.
Check yourself
Which point must a line of best fit pass through?
Show the answer
The mean point
The line balances the data about the mean of x and the mean of y.
4Making predictions
The line of best fit lets you estimate one variable from the other.
- Interpolation: predicting within the range of the data. Usually reliable, especially when the correlation is strong.
- Extrapolation: predicting outside the range of the data. Unreliable, because the pattern may not continue.
Using y = 5.5x + 36.5, where the data cover 2 to 9 hours
- For 4 hours: 5.5 × 4 + 36.5 = 58.5. This is interpolation, so it is a reasonable estimate.
- For 15 hours: 5.5 × 15 + 36.5 = 119. This is extrapolation, and it gives a score above 100%, which is impossible. The straight-line pattern cannot continue.
- To find the hours needed for a score of 75: 75 = 5.5x + 36.5 gives x = 7 hours.
When reading from a drawn graph, show your method with lines: go up from the horizontal axis to the line and across to the vertical axis.
How much to trust a prediction depends on three things: whether it is inside the data range, how strong the correlation is, and how much data there is.
Check yourself
Data were collected for heights between 140 cm and 180 cm. Which prediction is the most reliable?
Show the answer
The mass of a person 160 cm tall
160 cm is inside the range of the data, so this is interpolation.
5Correlation, causation and outliers
Correlation does not prove causation. Two variables can move together without one causing the other.
- A third variable may drive both. Ice cream sales and sunburn cases rise together because of hot, sunny weather. Ice cream does not cause sunburn.
- The link may be coincidence, especially with little data.
- The cause may run the other way: do people sleep badly because they are stressed, or become stressed because they sleep badly?
To show that one thing causes another, you need a controlled experiment or a clear explanation of how it works, not just a graph.
An outlier is a point that does not fit the pattern.
Dealing with an outlier
- In the revision data, one student revised for 3 hours and scored 95.
- Identify it: it lies far above the trend.
- Check it: is it a recording error (59 written as 95)? If so, correct it.
- If it is genuine, perhaps the student already knew the topic well. Keep it in the data, comment on it, and do not let it pull the line of best fit.
- Never delete a point just because it is inconvenient.
Good conclusions are cautious: "the data suggest", "tends to", and they mention the sample size and anything that limits the result.
Check yourself
Towns with more libraries also have more crime. What is the most likely explanation?
Show the answer
A third variable, population size, increases both
Bigger towns have more of both; correlation does not prove causation.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera