ViewWiki

Lesson 4 of 5

Correlation.

About 25 minutes · 6 practice questions

Two variables together: the scatter plot, the direction and strength of a link, the correlation coefficient $r$ and what it does not measure: not the slope, not a link that is not a straight line, and not a cause.

Step 1 of 6 · Rising and falling

Step 1 of 6

Rising and falling

Until now each reading was one number. Many interesting questions are about two numbers for each item: people’s height and weight, hours of study and marks, a flat’s price and its floor area. Each item is a point (x,y)(x, y)⁠, and together they make a scatter plot.

When the points rise from left to right there is a positive correlation: yy⁠ tends to grow as xx⁠ grows. When they fall, a negative correlation. The correlation coefficient rr⁠, between −1-1⁠ and 11⁠, sums this up in one number. Its sign is the direction, and its size is the strength: r=±1r = \pm 1⁠ when every point lies on a straight line, and r=0r = 0⁠ when there is no straight-line trend at all.

The points on the board fall. Predict rr⁠, then the board will work it out.

To the question

Step 2 of 6

Tighter

The readings on the board were made from a straight rule, y=5+0.6(x−5)y = 5 + 0.6(x - 5)⁠, plus noise: a random miss for each point. Noise sets how far the points stray from the rule. Right now the noise is large, 1.61.6⁠, and r=0.70r = 0.70⁠.

To the question

Step 3 of 6

Steep or tight

If rr⁠ did not change with the slope, what exactly does it measure? Compare two clouds of points. The board hides rr⁠ for now.

To the question

Step 4 of 6

Aiming for rr⁠

rr⁠ depends on how two things compare: how much yy⁠ changes along the line, and how far the points stray from it. A link with ∣r∣≥0.7|r| \ge 0.7⁠ is usually called strong, one with ∣r∣|r|⁠ between 0.30.3⁠ and 0.70.7⁠ moderate, and below 0.30.3⁠ weak. These are rules of thumb, not laws.

Right now r=0.89r = 0.89⁠. Build a link just as strong, the other way.

To the question

Step 5 of 6

Not a straight line

Now the slope is 00⁠, and rr⁠ is close to 00⁠: here there really is no link between xx⁠ and yy⁠, just noise about a level line.

But an rr⁠ close to 00⁠ does not always mean there is no link.

To the question

Step 6 of 6

Not a cause

The big danger in reading a correlation is to think it shows a cause. A strong correlation between xx⁠ and yy⁠ can happen because xx⁠ causes yy⁠, because yy⁠ causes xx⁠, because something else causes both, or by chance. The data alone cannot tell these apart.

To the question

Interactive scene

Loading the interactive version…

Each step sets up the Scene for you, and a control marked “fixed” stays put for that step.

To the experiment

Practice · Predict, then look

The readings on the board fall from left to right, and hug a line fairly closely. What will the correlation coefficient rr⁠ be?

To the experiment

Practice · Predict, then look

Right now r=0.70r = 0.70⁠. Turn Noise down from 1.61.6⁠ to 0.40.4⁠, keeping the slope the same. What happens to rr⁠?

To the experiment

Practice · Predict, then look

Two clouds of points. Cloud A has slope 0.30.3⁠ and noise 0.20.2⁠: a gentle, tight rise. Cloud B has slope 11⁠ and noise 22⁠: a steep, scattered rise. Which has the larger rr⁠?

To the experiment

Practice · Reach the target

Change Slope and Noise until the correlation coefficient is r=−0.9r = -0.9⁠, then press Check.

To the experiment

Practice · Choose

A ball is thrown up and its height measured every tenth of a second, from the throw until it is back in the hand. The scatter plot of height against time gives r≈0r \approx 0⁠. What does that tell you?

To the experiment

Practice · Choose

In a seaside town, over a year, weekly ice-cream sales and the number of drownings that week are strongly correlated: r=0.8r = 0.8⁠. What can you conclude?