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
- Interpret r in context, naming the direction, the strength, the word linear and both variables
- Compare the strength of two correlations by their sizes and not their signs
- Explain why a high r can occur with a curved pattern and why r near 0 can hide a clear curve
- Reject a claim of cause that rests only on a correlation
- Describe what r = 0, r = 1 and r = -1 mean
- 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 .
Both data sets are invented. In (a) the dots lie close to a straight band that rises. The direction is positive and is close to . In (b) the dots fall, so is negative, but they are well spread around any line, so is nearer to 0 than in (a).
Three facts hold forevery data set.
- The sign is the direction. A positive means that as the explanatory values increase, the response values tend to increase. A negative means they tend to decrease.
- The size is the strength. Compare , the value without its sign. A correlation of is a stronger linear association than .
- Perfect means all dots on one line. If or , 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 are called strong, values from about to 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
has no units. A correlation between heights and weights is a plain number, not centimeters or kilograms.
Changing units does not change . 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 .
Swapping the variables does not change . 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).
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.
A high 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 is high. A student who sees only might choose a straight line. The scatterplot, and later the residual plot (5.4), show that the form is not linear.
A value of 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 . 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 . 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 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) : 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) : 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 between height and arm span for one group and between age of a car and its resale value for another. The second association is stronger, because . The minus sign tells you the direction, and the strength is carried by the size.
What r is not.
- 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, , which is the subject of 5.5.
- is not "half as strong" as in any exact sense. Use the words strong, moderate and weak.
- is not a slope. A steep pattern and a shallow pattern can have the same .
6Getting r from technology
You do not compute 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 and 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.