Lesson 2.3 · Exploring Two-Variable Data
Correlation
Describing a scatterplot as "strong" or "moderate" is a judgment call, and two people looking at the same plot may disagree. The correlation turns the strength and direction of a linear relationship into a single number. In this lesson you'll see where that number comes from, how to interpret it, and, just as important, what it cannot tell you.
What r measures
Definition
Correlation
The correlation measures the direction and strength of the linear relationship between two quantitative variables. For individuals with values ,
where , , and are the means and standard deviations of the two variables.
In words: standardize every and every , multiply each individual's pair of z-scores, add up the products, and divide by .
Why does this work? An individual that is above average in both variables has two positive z-scores, so its product is positive. An individual below average in both has two negative z-scores, and the product is again positive. Individuals that are above average in one variable and below in the other contribute negative products. So when most points lie in the lower-left and upper-right regions around , the sum is positive; when most lie in the upper-left and lower-right, it is negative.
Worked example: Computing r by hand
Find the correlation for the five points , , , , .
First the summary statistics: and . The deviations of are , so . The deviations of are , so as well.
The products add to , so
In practice you'll use a calculator (on a TI-84, turn on diagnostics and run LinReg), but doing one by hand shows exactly what is adding up.
Interpreting r
The correlation is always between and .
- The sign gives the direction. Positive means a positive association.
- The magnitude gives the strength. Values near or mean the points lie close to a line; only when every point lies exactly on a line. Values near mean a weak linear relationship.
An interpretation on the AP exam should mention strength, direction, "linear," and the context. For the example above: "The correlation of indicates a fairly strong, positive, linear association between and ."
The three plots below show how scatter relates to .
Common mistake
Strength is about , not the sign. A correlation of is stronger than . Also, is not a percent and not a slope: does not mean " related," and a nearly flat line can have close to .
Properties of correlation
Because is built from z-scores, several facts follow directly from the formula.
- Roles don't matter. Swapping and swaps the two factors in each product, which doesn't change the sum. The correlation of height with weight equals the correlation of weight with height.
- Units don't matter. Z-scores have no units, so has no units. Converting inches to centimeters or Fahrenheit to Celsius leaves unchanged.
- Positive linear changes don't matter. Adding a constant to every value, or multiplying every value by a positive constant, does not change any z-score. Multiplying one variable by a negative constant flips the sign of each of its z-scores, so changes sign.
- is not resistant. It is built from means and standard deviations, which outliers pull strongly. One unusual point can make much larger or much smaller.
Worked example: Transforming a variable
For a group of adults, the correlation between daily temperature in °F and electricity use is . Find the new correlation if (a) temperature is converted to Celsius using , and (b) the analyst instead uses "degrees below °F," computed as .
(a) Celsius is a positive multiple of plus a constant, so every z-score is unchanged: .
(b) multiplies by a negative number, which flips the sign of every temperature z-score: . The relationship has the same strength; only the direction of the scale reversed.
Worked example: One point changes r
The eight points , , , , , , , have . What happens when the point is added?
With the new point, a calculator gives . The eight original points are still nearly collinear. The new point sits at , exactly at , so its and it adds nothing to the sum of products. But it is far above the other points, so it inflates , which shrinks every other point's . The correlation drops sharply. Always report whether a conclusion depends on one unusual point.
What r can't tell you
Correlation has limits
- only describes linear relationships. A strong curved relationship can have near , and a curved relationship can also have near . Always look at the scatterplot first.
- Correlation does not imply causation. A strong in observational data can come from a lurking variable that drives both variables. Only a well-designed randomized experiment can establish cause and effect.
- requires two quantitative variables. There is no correlation between gender and favorite sport; use a two-way table instead.
A classic example of the second point: across elementary schools, shoe size and reading level are strongly correlated. Bigger feet don't cause better reading. Age is the lurking variable: older children have bigger feet and read better.
Tip
Estimating from a plot: first decide the sign from the direction. Then imagine an oval drawn tightly around the points. A thin, pencil-like oval means near ; a fat, nearly round oval means near .
Practice
Which correlation indicates the strongest linear relationship?
Find the correlation, to two decimal places, for the points , , , , .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
For students, the correlation between hours of sleep and reaction time (in milliseconds) is . Which is the best interpretation?
The correlation between the weights of packages in pounds and their shipping costs in dollars is . Every weight is converted to kilograms (multiply by ) and a $2 handling fee is added to every cost. What is the new correlation?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A study finds that the correlation between a car's age (years) and its value (dollars) is . What is the correlation if the roles are switched, with value on the -axis and age on the -axis?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A scatterplot shows a clear U-shaped pattern, and a student computes . Which conclusion is correct?
Across U.S. cities, the number of hospitals and the number of deaths per year have a correlation of . Which statement is most reasonable?
Eight points lie very close to a rising line and have . A ninth point is added far to the right, exactly on the extension of that line. What is the most likely effect on ?