11.10 Correlation and regression — Learn
Prerequisites: Section 11.4 — the mean; plotting points on a coordinate grid.
Objectives: draw and read a scatterplot; describe correlation by direction and strength; match a correlation coefficient to a scatterplot; draw a line of best fit and use it to predict; explain why correlation does not prove causation.
By the end of this section you can describe the relationship between two variables, and you can say what that relationship does and does not prove.
Bivariate data
When we record two variables for each item, the data are bivariate. Each item gives a pair of values, such as a person's height and shoe size, or a car's age and its price.
A scatterplot shows each pair as a point. The first variable goes on the horizontal axis and the second on the vertical axis. The pattern of the points is the whole point of the display.
Describing correlation
Correlation describes how the two variables move together.
- Positive correlation. As one variable increases, the other tends to increase. The points rise from left to right.
- Negative correlation. As one variable increases, the other tends to decrease. The points fall from left to right.
- No correlation. The points show no pattern.
The strength of the correlation says how close the points lie to a straight line. A strong correlation has points tightly packed along a line, and a weak one has them scattered widely.
The correlation coefficient
The strength and direction are combined in one number, the correlation coefficient . It always lies between and .
| Value of | Meaning |
|---|---|
| perfect positive correlation | |
| near , such as | strong positive correlation |
| near | little or no linear correlation |
| near , such as | strong negative correlation |
| perfect negative correlation |
A calculator or spreadsheet finds from the data. The sign tells you the direction, and the distance from tells you the strength.
The booklet also gives the critical value a rank correlation is compared with. Spearman's critical values open that table.
Correlation is not causation. A strong correlation between two variables does not prove that one causes the other. A third variable may drive both, or the two may be related by coincidence.
Example 1. Ice-cream sales and the number of drowning deaths are strongly positively correlated across the year. Explain why this does not show that ice cream causes drowning.
Both variables rise in hot weather. The weather is a third variable that drives both, and it explains the correlation. A correlation is a description of the data, and it does not by itself identify a cause.
The line of best fit
When the points on a scatterplot follow a straight line, we can draw a line of best fit through them. Draw it so that the points lie roughly equally above and below the line, and make sure it passes through the middle of the cloud of points.
The line lets us predict a value of one variable from the other.
Example 2. A line of best fit for the price of a used car against its age is , where is the age in years and is the price in euro. Predict the price of a car that is years old.
The prediction is €. The prediction is a reading from the line, and it is only as good as the line and the data.
The least-squares line
A calculator or spreadsheet does not draw the line by eye. It finds the least-squares regression line , which makes the sum of the squared vertical distances from the points to the line as small as possible. The gradient and the intercept are found from the data, and the calculator also gives .
The gradient is the change in for each extra unit of . If for the car data, each extra year of age is associated with about € less in price.
Progress check
Back to the chapter problem. The table shows the last poll before eight referendums and the actual result, both as the percentage voting Yes.
| Poll | ||||||||
|---|---|---|---|---|---|---|---|---|
| Result |
A scatterplot of these pairs gives a correlation coefficient of about , and the least-squares line is close to .
The correlation is strong and positive: polls that predicted a high Yes vote generally saw a high Yes vote. The line is close to , which is what a reliable poll would give.
Now find the referendum in the chapter problem: a poll of and a result of . The line predicts , so the actual lies about three points below the line.
That single point is the poll that got it wrong. It is one point among eight, and the strong overall correlation does not promise that every poll is accurate. Section 11.11 looks at how a single unusual point can be used, or misused, in an argument.
You should now be able to
- draw and read a scatterplot;
- describe correlation by direction and strength;
- match a value of to a scatterplot;
- draw a line of best fit and use it to predict;
- tell interpolation from extrapolation;
- explain why correlation does not imply causation.