Educerie

Educerie · AP · Statistics

AP Statistics 5.2

Correlation

How can we describe the relationship between two quantitative variables, and how well can one be used to predict the other?

What you will learn

  • Understand that r measures the strength and direction of linear association between two quantitative variables, has no units and lies between -1 and 1
  • Know that r = 0 means no linear association and that r = 1 or r = -1 means a perfect one
  • Understand why r near 1 or -1 does not show that a linear model is appropriate
  • Know that a correlation, however strong, does not show that one variable causes the other

You must be able to

  1. Interpret r in context, naming the direction, the strength, the word linear and both variables
  2. Compare the strength of two correlations by their sizes and not their signs
  3. Explain why a high r can occur with a curved pattern and why r near 0 can hide a clear curve
  4. Reject a claim of cause that rests only on a correlation
  5. Describe what r = 0, r = 1 and r = -1 mean
  6. State that r is unchanged by changing units or swapping the variables

In the exam. Section I asks you to pick the correct interpretation of a stated r in context, to compare the strength of two correlations, or to decide which claim a given r supports. It is usually the first question in the regression set of three. In Section II, a free-response question can ask you to interpret r in context and to say why a high r does not show that one variable causes the other.

1What r measures

Figure 1 shows two scatterplots with their values of rr.

Figure 1. Two scatterplots with their correlation coefficients: on the left solar panel output rises with hours of daylight along a close straight band, r is close to 1; on the right sleep falls with screen time but with more scatter, r is negative and moderate (a) r = 0.96 2 4 6 8 10 12 0 2 4 6 8 10 Output (kWh) Daylight (h) Figure 1. Two scatterplots with their correlation coefficients: on the left solar panel output rises with hours of daylight along a close straight band, r is close to 1; on the right sleep falls with screen time but with more scatter, r is negative and moderate (b) r = −0.55 0 1 2 3 4 5 6 7 4 6 8 10 Sleep (h) Screen time (h)
Figure 1 · Solar panel output against hours of daylight (r = 0.96) and hours of sleep against screen time (r = −0.55)

Both data sets are invented. In (a) the dots lie close to a straight band that rises. The direction is positive and rr is close to 11. In (b) the dots fall, so rr is negative, but they are well spread around any line, so rr is nearer to 0 than in (a).

Three facts hold forevery data set.

  • The sign is the direction. A positive rr means that as the explanatory values increase, the response values tend to increase. A negative rr means they tend to decrease.
  • The size is the strength. Compare ∣r∣|r|, the value without its sign. A correlation of −0.8-0.8 is a stronger linear association than 0.60.6.
  • Perfect means all dots on one line. If r=1r = 1 or r=−1r = -1, every dot lies exactly on a straight line. Real data almost never do this.

How big is "strong"? The course sets no official cut-offs. As a rough guide, values beyond about ±0.8\pm 0.8 are called strong, values from about ±0.5\pm 0.5 to ±0.8\pm 0.8 moderate, and values nearer 0 weak. Exam questions are written so that the call is clear, and they usually give you the scatterplot or a pair of values to compare.

2Properties worth knowing

rr has no units. A correlation between heights and weights is a plain number, not centimeters or kilograms.

Changing units does not change rr. Measuring one variable in hours and then in minutes, or in centimeters and then in inches, gives the same value. In Figure 1(a), changing kWh into MJ or hours into minutes leaves r=0.96r = 0.96.

Swapping the variables does not change rr. The correlation of output with daylight equals the correlation of daylight with output. This is different from the regression line, which does change (5.5).

rr is only about linear association. It measures how closely the dots follow a straight line. Two further cautions follow, and the exam tests both.

3Two traps: r near 1 or near 0 is not the whole story

Figure 2 shows two curved patterns.

Figure 2. Two scatterplots where r misleads: on the left the pattern is a curve that levels off, yet r is high; on the right the dots follow a clear U-shaped curve, yet r is close to 0 (c) r = 0.89, curved 2 4 6 8 10 4 8 12 0 Height (cm) Weeks after planting Figure 2. Two scatterplots where r misleads: on the left the pattern is a curve that levels off, yet r is high; on the right the dots follow a clear U-shaped curve, yet r is close to 0 (d) r = −0.04, a clear curve 20 60 100 140 3 5 7 9 Fuel (L per 100 km) Speed (km/h)
Figure 2 · A curve that levels off with r = 0.89, and a U-shaped curve with r = −0.04

A high ∣r∣|r| does not mean a linear model is appropriate. In (c) the seedling's height rises quickly and then levels off. The dots follow a curve, yet r=0.89r = 0.89 is high. A student who sees only rr might choose a straight line. The scatterplot, and later the residual plot (5.4), show that the form is not linear.

A value of rr near 0 does not mean no association. In (d) fuel use is high at low speeds, lowest at moderate speeds and high again at high speeds. The pattern is very clear, but it is a U, so r=−0.04r = -0.04. There is no linear association, and there is still a strong association of another form.

So the rule is: always look at the scatterplot as well as rr. The number is a summary of linear association only.

4Correlation is not causation

A strong correlation between two variables does not mean that changes in one cause changes in the other. Three things can produce a correlation with no cause between the variables.

  • A third variable drives both. Example (invented): across 40 days, the number of umbrellas sold in a city is strongly positively correlated with the number of traffic accidents. Umbrellas do not cause accidents. Rain increases both.
  • Chance. With few observations, a high rr can arise by accident.
  • The direction of cause may be the reverse of what you assume. Which variable affects which can be unclear without more information.

A claim of cause needs a well-designed experiment with random assignment (Unit 1). A correlation from observational data supports only the statement that the variables are associated.

A strong positive correlation between umbrella sales and accidents shows that days with more umbrella sales tend to have more accidents. It does not show that selling umbrellas causes accidents.

5Interpreting r in context

A full interpretation names the direction, the strength and the two variables, and says "linear".

Template: "There is a (strong / moderate / weak) (positive / negative) linear association between (explanatory variable) and (response variable)."

Worked example (Figure 1).

  • (a) r=0.96r = 0.96: there is a strong positive linear association between hours of daylight and the solar panel's output. Days with more daylight tend to have more output.
  • (b) r=−0.55r = -0.55: there is a moderate negative linear association between daily screen time and hours of sleep. People with more screen time tend to sleep fewer hours.

Comparing two correlations. A study finds r=0.62r = 0.62 between height and arm span for one group and r=−0.81r = -0.81 between age of a car and its resale value for another. The second association is stronger, because ∣−0.81∣>∣0.62∣|-0.81| > |0.62|. The minus sign tells you the direction, and the strength is carried by the size.

What r is not.

  • r=0.96r = 0.96 does not mean "96% of the dots lie on the line" or "96% of the output is explained". Percent of variation is a different number, r2r^{2}, which is the subject of 5.5.
  • r=0.5r = 0.5 is not "half as strong" as r=1r = 1 in any exact sense. Use the words strong, moderate and weak.
  • rr is not a slope. A steep pattern and a shallow pattern can have the same rr.

6Getting r from technology

You do not compute rr by hand. The exam reference sheet has no formula for it, and the course asks you to read it from technology. On a graphing calculator, the linear regression command reports rr and r2r^{2} once the statistics diagnostics are switched on. In a spreadsheet or Desmos the correlation function does the same.

Writing down only the calculator's command earns nothing without the result interpreted. Always follow the number with a sentence in context, as in section 6.

Practice questions

30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.