Lesson 7 of 8 · 16 min

Pearson's correlation coefficient, r

Calculate Pearson's correlation coefficient r from raw data with technology, and interpret it to quantify the strength and direction of a linear association.

What you will be able to do

  • State what rr measures and the values it can take.
  • Calculate rr from raw data with a calculator or spreadsheet.
  • Use rr to describe the strength and direction of a linear association, in context.
  • Recognise when rr should not be used: non-linear associations and data with outliers.

"Moderate" or "strong" by eye is a judgement call, and two people can look at the same scatterplot and disagree. Pearson's correlation coefficient, rr, settles it with a number calculated from the data: its sign gives the direction of a linear association and its size gives the strength.

Interactive

Watch r respond

These are the netball data from the last lesson, with r=0.609r = 0.609. Drag points towards a straight line and watch rr move towards 1; scatter them and it moves towards 0; make the pattern fall and it turns negative.

Definition

Pearson's correlation coefficient

rr measures the strength and direction of a linear association between two numerical variables.

  • It always lies between −1-1 and 11.
  • The sign gives the direction: r>0r > 0 is positive, r<0r < 0 is negative.
  • The size gives the strength: the closer rr is to 11 or −1-1, the closer the points are to a straight line.
  • r=1r = 1 or r=−1r = -1 means every point lies exactly on a line; rr near 0 means no linear association.
A commonly used guide for describing strength from rr. It is a guide, not a rule: a value near a boundary can reasonably be described either way, so always quote rr as well.
Value of rrLinear association
r=1r = 1perfect positive
0.75≤r<10.75 \le r < 1strong positive
0.5≤r<0.750.5 \le r < 0.75moderate positive
0.25≤r<0.50.25 \le r < 0.5weak positive
−0.25<r<0.25-0.25 < r < 0.25no linear association
−0.5<r≤−0.25-0.5 < r \le -0.25weak negative
−0.75<r≤−0.5-0.75 < r \le -0.5moderate negative
−1<r≤−0.75-1 < r \le -0.75strong negative
r=−1r = -1perfect negative

Which value of rr shows the strongest linear association?

Choose one answer

With a scientific calculator

  1. Switch to statistics (regression) mode and choose the linear model, often shown as y=a+bxy = a + bx.
  2. Enter the explanatory variable in the xx column and the response variable in the yy column, one pair per row.
  3. Display the regression results and read rr. (The aa and bb values are the line you'll fit in the next topic.)

With a spreadsheet

Put the xx values in A2:A11 and the yy values in B2:B11. Then

  • =CORREL(A2:A11, B2:B11) gives rr (so does =PEARSON(...))
  • =RSQ(B2:B11, A2:A11) gives R2R^2, which comes next lesson.

Worked example

Calculate and interpret r with technology

  • Simple familiar
  • Technology active

The owner of a beach kiosk on the Gold Coast recorded the daily maximum temperature and the number of ice-creams sold on 10 days in November.

Max. temperature (°C)22242527282930313335
Ice-creams sold118135140162158175181176205214

(a) Use technology to calculate Pearson's correlation coefficient, correct to three decimal places.

(b) Interpret the value of rr.

4 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Enter the explanatory variable as xx and the response variable as yy.

  2. Use linear regression in statistics mode and read rr, rounded to three decimal places.

  3. Check that the scatterplot is linear.

  4. Interpret with the value, strength, direction, the word linear and the context.

Watch out for

  • Writing "strong correlation" with no direction, no mention of linear and no context. Each of those is part of the interpretation.

Exam tip

Interpreting r

Quote the value, then give strength, direction, the word linear, and the context:

"r=0.987r = 0.987 indicates a strong positive linear association between daily maximum temperature and the number of ice-creams sold."

Eight students recorded how many hours they slept the night before a reaction-time test, and their reaction time.

Sleep (hours)55.566.577.589
Reaction time (ms)352341330338312318298290

Use technology to calculate Pearson's correlation coefficient, correct to three decimal places.

Round to 3 decimal places.

rr measures how close the points are to a straight line, so it only describes linear associations. Always look at the scatterplot first. Here is the concentration of a medicine in a patient's blood in the hours after a dose.

The points follow a clear hump-shaped curve, yet r=−0.082r = -0.082.

An rr of −0.082-0.082 says there is no linear association — and that is true. But the association is strong: the concentration rises, peaks and falls along a smooth curve. rr can't see curves, so an rr near 0 does not mean the variables are unrelated, and an rr near ±1\pm 1 does not prove the form is linear.

Worked example

When r looks strong but the pattern curves

  • Complex familiar
  • Technology active

A Brisbane start-up recorded the total number of downloads of its new app at the end of each of the first 10 weeks after launch.

Week12345678910
Downloads (thousands)234681217243448

A team member calculates r=0.922r = 0.922 and reports "a strong positive linear association between week and downloads". Evaluate this conclusion.

4 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Always look at the scatterplot before using rr.

  2. If the pattern is curved, describe the form as non-linear and don't rely on rr.

  3. A value of rr near ±1\pm 1 does not prove an association is linear.

Watch out for

  • Accepting the conclusion because rr is close to 1.

Common mistake

Outliers drag r around

A used-car dealer's data on nine cars' ages and odometer readings had r=0.801r = 0.801. One reading had been typed as 8 (thousand km) instead of 82. With the typo fixed, r=0.999r = 0.999. A single point changed the description from "strong" to "almost perfect" — so check outliers before you quote rr.

Where does r come from?

Pearson's rr is the average product of the zz-scores of each pair (dividing by n−1n - 1, as for the sample standard deviation):

r=1n−1∑i=1n(xi−xˉsx)(yi−yˉsy)r = \frac{1}{n-1}\sum_{i=1}^{n}\left(\frac{x_i - \bar{x}}{s_x}\right)\left(\frac{y_i - \bar{y}}{s_y}\right)

Draw a vertical line through xˉ\bar{x} and a horizontal line through yˉ\bar{y}. A point to the top-right or bottom-left has two zz-scores with the same sign, so it adds a positive product; a point to the top-left or bottom-right adds a negative product.

When most points lie top-right and bottom-left, the products are mostly positive and rr is close to 1. When the points are spread over all four quarters, the products cancel and rr is close to 0. Dividing by the standard deviations makes rr unit-free, which is why it always lies between −1-1 and 11.

For 40 teenagers, Pearson's correlation coefficient between weekly hours of screen time and weekly hours of physical activity is r=−0.58r = -0.58. Which statement interprets this correctly?

Choose one answer

Summary

  • rr measures the strength and direction of a linear association, and always lies between −1-1 and 11.

  • The sign gives the direction; the size gives the strength (strong for ∣r∣≥0.75|r| \ge 0.75, moderate from 0.5, weak from 0.25, and no linear association below 0.25).

  • Calculate rr with technology: the linear regression option in your calculator's statistics mode, or =CORREL() in a spreadsheet.

  • Interpret rr with its value, strength, direction, the word linear and the context.

  • Check the scatterplot first: rr is meaningless for a non-linear pattern, and outliers can distort it.

Finished the lesson?

Try the 3 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 7 of 80% read

Save your progress with a free account