impera Open Impera

AP Statistics · Exploring two-variable data

Scatterplots and correlation

1Scatterplots

A scatterplot shows the relationship between two quantitative variables measured on the same individuals.

  • The explanatory variable ($x$) may help explain or predict changes in the response variable ($y$).
  • Put the explanatory variable on the horizontal axis.

Describe a scatterplot using direction, form, strength and unusual features (DFSU), in context:

  • Direction: positive (as $x$ increases, $y$ tends to increase) or negative.
  • Form: linear or curved (non-linear); clusters.
  • Strength: how closely the points follow the form (strong, moderate, weak).
  • Unusual features: outliers, clusters, gaps.

Describe direction, form, strength and unusual features; r only measures linear strength

Check yourself

In a study of hours studied and exam score, the explanatory variable is:

  • Hours studied

  • Exam score

  • Both

  • Neither

Show the answer

Hours studied

It may explain the score.

2The correlation coefficient r

The correlation $r$ measures the direction and strength of a linear relationship:

$$r = \frac{1}{n - 1}\sum\left(\frac{x_i - \bar{x}}{s_x}\right)\left(\frac{y_i - \bar{y}}{s_y}\right)$$

Properties:

  • $-1 \le r \le 1$. The sign gives direction; $|r|$ close to 1 means strong.
  • $r = \pm 1$: points lie exactly on a line. $r \approx 0$: no linear relationship (there may still be a curved one).
  • $r$ has no units and does not change if you change units or swap $x$ and $y$.
  • $r$ is not resistant: one outlier can change it a lot.
Check yourself

r = −0.92 indicates:

  • A weak negative relationship

  • A strong negative linear relationship

  • A strong positive relationship

  • No relationship

Show the answer

A strong negative linear relationship

Sign and size.

3Correlation cautions

  • Correlation is not causation. Ice cream sales and drownings are positively correlated, but both are driven by a lurking variable (hot weather).
  • $r$ describes only linear association. A perfect U-shape can have $r \approx 0$.
  • Always plot the data first; outliers and curvature can make $r$ misleading.
  • Correlation based on averages (e.g. state averages) is usually stronger than for individuals.
Worked example

a scatterplot of age (5 to 60) against reaction time is U-shaped (fast for young adults, slower for children and older adults). Then $r$ may be near 0 even though there is a strong non-linear relationship.

Check yourself

A strong curved relationship can have r close to:

  • 1 always

  • −1 always

  • 2

  • 0

Show the answer

0

r measures linear association only.

4Influential points

An outlier in a scatterplot is a point far from the pattern. A point with an unusually large or small $x$ value has high leverage. A point is influential if removing it substantially changes $r$ or the regression line.

Worked example

10 points show $r = 0.15$, but one extra point far to the upper right raises $r$ to 0.70. That point is influential; the "strong" correlation depends on one observation.

Check yourself

Removing one point changes r from 0.85 to 0.20. The point is:

  • The mean

  • A residual

  • Influential

  • Irrelevant

Show the answer

Influential

It drives the correlation.

5Going deeper: describing a scatterplot, and what r does and does not tell you

A scatterplot shows the relationship between two quantitative variables measured on the same individuals. The explanatory variable goes on the horizontal axis and the response on the vertical. If neither explains the other, either may go on either axis.

Describe four things, in context (DUFS)

  • Direction: positive (as x increases, y tends to increase), negative, or none.
  • Unusual features: outliers, clusters, gaps.
  • Form: linear or curved (nonlinear).
  • Strength: how closely the points follow the form: weak, moderate or strong.
Worked example

a scatterplot of hours studied (x) against exam score (y) for 30 students.
"There is a moderately strong, positive, linear association between hours studied and exam score: students who studied longer tended to score higher. One student who studied 9 hours but scored 55 falls well below the pattern."

Correlation (r) measures the direction and strength of a linear relationship.

$$r = \frac{1}{n - 1}\sum\left(\frac{x_i - \bar{x}}{s_x}\right)\left(\frac{y_i - \bar{y}}{s_y}\right)$$

It is the average product of the z-scores.

Properties of r

  • Always between −1 and 1.
  • The sign gives the direction.
  • |r| near 1: points close to a line; near 0: little linear relationship.
  • r = ±1 only when the points lie exactly on a line.
  • No units.
  • Unchanged when x and y are swapped.
  • Unchanged by changing units (adding a constant to, or multiplying by a positive constant, either variable).
  • Not resistant: one outlier can raise or lower it greatly.
  • Requires both variables to be quantitative.

What r does not tell you

  • Form: r measures only linear association. A strong curved relationship can have r near 0. Always plot the data.
  • Slope: r = 0.9 does not mean a steep line.
  • Causation.

Worked example (r = 0 does not mean "no relationship"): the points (−2, 4), (−1, 1), (0, 0), (1, 1), (2, 4) lie exactly on the curve y = x². Their correlation is 0, because there is no linear trend, although y is completely determined by x.

Worked example (effect of an outlier): ten points show almost no pattern (r ≈ 0.1). An eleventh point is added far to the upper right. The correlation jumps to about 0.8. One point has created the appearance of a strong linear relationship. Conversely, a single point far from an otherwise strong pattern can drag r toward 0.

Interpreting strength: there are no fixed cut-offs, but roughly: |r| below 0.3 weak; 0.3 to 0.7 moderate; above 0.7 strong. Judge alongside the plot.

Correlation is not causation. A strong association between x and y may arise because:

  • x causes y;
  • y causes x;
  • a lurking (confounding) variable affects both; or
  • coincidence.

Examples: ice-cream sales and drownings (hot weather drives both); the number of firefighters at a fire and the damage done (the size of the fire drives both); shoe size and reading ability in children (age drives both).

Only a well-designed experiment, with random assignment, can establish cause and effect.

Averaged data: correlations based on averages (of countries, schools or groups) are usually stronger than correlations between individuals, because averaging removes variation. Do not apply them to individuals.

Categorical variables: "correlation" is a technical term for two quantitative variables. For categorical variables, say "association."

Adding a categorical variable: plotting groups with different symbols or colors can reveal that an overall pattern hides different patterns within groups.

Common mistakes

  • Describing a scatterplot without context.
  • Using r to describe a curved relationship.
  • Writing "r shows that x causes y."
  • Saying "correlation" between a categorical and a quantitative variable.
  • Thinking changing units changes r.
  • Confusing r with the slope.
Check yourself

The correlation between height in inches and weight in pounds for a group of people is 0.72. If heights are converted to centimeters, the correlation will be:

  • Greater than 0.72

  • 0.72

  • Less than 0.72

  • Impossible to determine

Show the answer

0.72

Correlation has no units and is unchanged by a change of scale.

6For top marks

  • Describe all four features (direction, form, strength, unusual features) in context.
  • Interpret $r$ precisely: "There is a strong, positive, linear association between ... ($r = 0.87$)."
  • Never use $r$ to claim causation; name a plausible lurking variable.
  • Check the scatterplot for curvature before trusting $r$.
Example

"There is a moderately strong, negative, linear relationship between car age and price ($r = -0.78$), with one unusually expensive old car (a classic)."

Check yourself

Which statement is correct?

  • r has the same units as y

  • Changing units from miles to kilometres does not change r

  • r is resistant to outliers

  • r = 0 means there is no relationship of any kind

Show the answer

Changing units from miles to kilometres does not change r

r is unitless.

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