What the chart shows
A scatter plot draws pairs of values, two quantities measured on the same person, object or occasion. Each pair becomes a point, with one quantity along the horizontal axis and the other along the vertical one. The NIST/SEMATECH e-Handbook of Statistical Methods describes the chart as a way to reveal relationships between two variables: the vertical axis usually holds the quantity to be explained, the horizontal one the quantity suspected to be related to it.
The data behind the figure
| Preparation (h) | Points |
|---|---|
| 1 | 12 |
| 2 | 15 |
| 3 | 14 |
| 4 | 19 |
| 5 | 21 |
| 6 | 20 |
| 7 | 25 |
| 8 | 26 |
The pattern in the cloud of points is what the chart shows:
- The direction. If the points rise to the right the relationship is positive: larger x goes with larger y. If they fall it is negative. With no slope there is no linear relationship.
- The strength. The closer the points lie to a straight line, the stronger the linear relationship.
- The shape. A relationship can be curved, and the points can form groups.
- Outliers. A point far from the others, which may be a measuring error or an interesting exception.
How to read it
- A point’s values. Go straight down to the horizontal axis and across to the vertical one. The pupil who prepared for 5 hours scored 21.
- The direction. Here the points rise: more hours go with more points.
- The line of best fit. The straight line that lies closest to the points, worked out by the least squares method. For the eight pupils it is y = 2x + 10: each hour goes with 2 more points, and the line passes through the mean point, 4.5 hours and 19 points.
- The strength as a number. The correlation coefficient r lies between −1 and 1. Here r ≈ 0.97, a strong positive linear relationship.
When it fits and when it does not
A scatter plot fits when two quantities have been measured in pairs and the question is whether they are related. UNECE’s guide to presenting statistics calls it the most accurate way to display correlations, and notes that some analysts still prefer bar charts, as scatter plots can be difficult to interpret.
It does not fit when:
- Only one quantity has been measured. Its distribution is shown in a histogram or a box plot.
- One of the quantities is categories. The mean score per class is a bar graph.
- x is time and the development is the question. A line graph joins the points in order and shows the change.
Common mistakes
- A relationship read as a cause. NIST writes that association does not imply causality and that a scatter plot can never prove cause and effect. Two quantities may both depend on a third, or be related by chance in a small sample. See correlation and causation.
- r near 0 read as no relationship. r measures only how well a straight line fits. The points (−2, 4), (−1, 1), (0, 0), (1, 1) and (2, 4) lie exactly on the curve y = x², and still r = 0.
- The line extended beyond the data. The line of best fit describes the values there are. For 12 hours it gives y = 2 · 12 + 10 = 34 points, more than the test’s 30. Using the line outside the measured values is called extrapolation, and it can give unreasonable answers.
- x and y swapped. The line for y in terms of x is not the same line as for x in terms of y, except when all the points lie on a straight line (below).
Going deeper: what r and the line say, and what they do not
The correlation coefficient and the line of best fit summarise the points with a few numbers, and different clouds of points can give the same numbers. In 1973 F. J. Anscombe constructed four data sets of eleven points each in which x has the mean 9 and y the mean 7.5, the correlation is 0.82 and the line of best fit is y = 3 + 0.5x in all four. In a scatter plot they look entirely different: a cloud around a line, a curve, a straight line with a single outlier, and ten points directly above one another with the eleventh far to the side. The chart is needed even when the numbers are known.
The square of r, r², is the share of the variation in the y values that the line explains. For the eight pupils r² ≈ 0.93. That says how well the line describes these eight, not that preparation time explains 93% of test results in general.
The least squares method places the line so that the sum of the squares of the vertical distances is as small as possible. With the axes swapped the distances are measured horizontally instead, and that gives a different line. For the eight pupils the line for y in x has the slope 2, while the line for x in y, rewritten as y in terms of x, has a slope of about 2.14. The two coincide only when r = 1 or r = −1.