Pearson correlation coefficient
r lies between −1 and 1 and shows a linear relation; it says nothing about cause and effect.
Worked example
Work out Pearson's correlation coefficient for these pairs.
| x | y |
|---|---|
| 1 | 12 |
| 2 | 12 |
| 3 | 13 |
| 6 | 22 |
| 7 | 25 |
Worked solution
- 1.r = Σ(xᵢ − x̄)(yᵢ − ȳ) / √(Σ(xᵢ − x̄)² · Σ(yᵢ − ȳ)²)
- 2.= 62.80 / √(26.80 · 154.80) = 0.98
- 3.|r| close to 1 means a strong linear relation; the sign shows the direction.
Typical mistake: Reading correlation as causation.
Your turn
Three problems of exactly this type, each time with new numbers. Comma or point; fractions like 1/6 work too.
Task 1 of 3Regression & correlation
Task
Work out Pearson's correlation coefficient for these pairs.
| x | y |
|---|---|
| 1 | 14 |
| 2 | 14 |
| 4 | 19 |
| 5 | 19 |
| 7 | 26 |
r (2 decimal places)
Comma or point; fractions like 1/6 work too.
Formulas for this topic
- b = Σ(xᵢ − x̄)(yᵢ − ȳ) / Σ(xᵢ − x̄)²
- a = ȳ − b · x̄
- r = Σ(xᵢ − x̄)(yᵢ − ȳ) / √(Σ(xᵢ − x̄)² · Σ(yᵢ − ȳ)²), −1 ≤ r ≤ 1
Typical mistake: Reading correlation as causation.
Frequently asked questions
What is the typical mistake in "Pearson correlation coefficient"?
Reading correlation as causation.
Does high correlation mean causation?
No. A relation can come from a third variable or chance.
