ASCENTLEARNING
Join a weekly class
Skip to learning content
YEAR 12 · STATISTICS AND REGRESSION · 18 MIN

Pearson correlation and coefficient of determination

Calculate and interpret Pearson’s r and the coefficient of determination.

In this lesson

Before you start
  • Read numerical axes and calculate a mean.
01 / LEARN

Understand the idea.

Pearson correlation measures linear association

Pearson's correlation satisfies −1≤r≤1 when both numerical variables vary. The sign describes linear direction and ∣⁢r⁢∣ describes linear strength. Values near zero rule out a strong straight-line tendency, but do not rule out a curved association.

The centred sums compare deviations from each variable's own mean: Sx⁢x=∑(xi−x¯)2, Sy⁢y=∑(yi−y¯)2 and Sx⁢y=∑(xi−x¯)⁢(yi−y¯). Keep corresponding observations paired when calculating or entering them into technology.

r=Sx⁢ySx⁢xSy⁢y, where the sums use deviations from the respective means.

Interpret r-squared in the fitted linear model

For ordinary least-squares regression with an intercept, r2 is the coefficient of determination. The percentage 100r2% describes the observed response variation accounted for by that fitted linear relationship. It is a measure of sample fit, not a guarantee for new predictions.

Squaring removes the sign, so r2 cannot tell you whether the association rises or falls. It also does not measure causation, a percentage of the response amount, or the proportion of individual predictions that are correct.

02 / WORKED EXAMPLES

See the method in action.

EXAMPLE 01

Calculate from centred sums

A data set has Sxx=20, Syy=45 and Sxy=-24. Calculate r and r².

Worked solution

  1. 1

    Find the denominator from the two sums of squares.

    Sx⁢xSy⁢y=20×45=30

    Both sums are positive, so the correlation denominator is nonzero.

  2. 2

    Calculate the signed correlation.

    r=−2430=−0.8

    The negative cross-product sum gives a negative linear association.

  3. 3

    Square the correlation.

    r2=(−0.8)2=0.64

    The coefficient of determination is nonnegative even when the correlation is negative.

  4. 4

    Interpret the result in the fitted model.

    100r2%=64⁢%

    For a least-squares line with an intercept, 64% of the observed response variation is accounted for by the fitted linear relationship.

Answer

r=-0.8 and r²=0.64; negative linear association.

EXAMPLE 02

Use paired measurements

Calculate the correlation for the supplied data.

Paired measurements
xy
13
24
34
46
58

Worked solution

  1. 1

    Calculate the two means.

    x¯=1+2+3+4+55=3y¯=3+4+4+6+85=5

    Each mean uses all five observations of its own variable.

  2. 2

    List the paired deviations.

    xi−x¯:−2,−1,0,1,2yi−y¯:−2,−1,−1,1,3

    Keeping the order ensures that each cross-product uses measurements from the same row.

  3. 3

    Form the centred sums.

    Sx⁢x=4+1+0+1+4=10Sy⁢y=4+1+1+1+9=16Sx⁢y=4+1+0+1+6=12

    Square deviations for the two variation sums and multiply paired deviations for the cross-product sum.

  4. 4

    Calculate correlation and its square.

    r=1210×16≈0.9487r2=12210×16=0.9

    The positive value indicates a strong positive linear association. Squaring the unrounded value avoids rounding error in the 90% determination coefficient.

Answer

Positive linear correlation; r≈0.9487, r²≈0.9.

03 / YOUR TURN

Try it yourself.

Check your understanding

For r=-0.6, find the coefficient of determination.

Show answer & reasoning

0.36, or 36%.

Square the signed correlation: r2=(−0.6)2=0.36. Thus the coefficient of determination is 0.36, or 36⁢%; the original negative direction is no longer visible in the square.

Keep practising

6 worksheet questions · 18 marks

Read the questions online
  1. Given Sx⁢x=16,Sy⁢y=25 and Sx⁢y=18, calculate r and r2.
    3 marks
  2. A fit has r=−0.75. State its direction and percentage of response variation explained.
    3 marks
  3. A student reports r=1.12. Explain the problem.
    3 marks
  4. A fitted model has r2=0.49 and a negative slope. Find r.
    3 marks
  5. If every x-value is converted from metres to centimetres, what happens to r?
    3 marks
  6. All five response values are 7. Why is Pearson r undefined?
    3 marks
Read the worked solutions

Equivalent correct methods earn the corresponding marks. Include units where asked.

  1. Given Sx⁢x=16,Sy⁢y=25 and Sx⁢y=18, calculate r and r2.
    3 marks

    The denominator is 16×25=20.

    Divide 18 by 20 and square the result.

    r=0.9; r2=0.81.
  2. A fit has r=−0.75. State its direction and percentage of response variation explained.
    3 marks

    The sign gives negative association.

    100×(−0.75)2=56.25.

    Negative direction; 56.25% explained.
  3. A student reports r=1.12. Explain the problem.
    3 marks

    The theoretical range is −1≤r≤1.

    Check data pairing, entry and the calculation.

    A Pearson correlation cannot exceed 1.
  4. A fitted model has r2=0.49 and a negative slope. Find r.
    3 marks

    Take the square root, giving magnitude 0.7.

    Use the slope direction to choose the negative sign.

    r=−0.7.
  5. If every x-value is converted from metres to centimetres, what happens to r?
    3 marks

    Multiplication by a positive constant changes scale, not linear correlation.

    It stays the same.
  6. All five response values are 7. Why is Pearson r undefined?
    3 marks

    A standardised measure of shared variation cannot be calculated.

    The response has zero variation, so Sy⁢y=0 and the denominator is zero.
Checking saved progress…
Curriculum reference & lesson scope

SACE Board of South Australia

Stage 2 General Mathematics: statistical models. Original lessons and assessment practice; not an official SACE assessment.

Official curriculum source ↗

Save your next step.

Create a free account to save your learning progress. Lessons and downloads stay free, with or without an account.

Create free account