- Practice
- About 20 min
- 5 practice questions
Correlation and Karl Pearson's coefficient
Classify correlation by direction, number of variables and linearity, describe the scatter diagram and graphic methods, and calculate Karl Pearson's coefficient of correlation by the direct, actual mean and assumed mean methods.
If something looks wrong, please tell us.
By the end of this lesson you can
- Name the three ways of classifying correlation and give an economic example of each type.
- Read a scatter diagram for the direction and rough degree of correlation.
- Calculate and interpret Karl Pearson's r by three methods.
Economics is full of pairs of variables that move together: income and spending, price and quantity demanded, rainfall and crop output. Correlation is the statistical tool for studying how two or more variables vary together. The textbook credits Sir Francis Galton with the idea of the correlation coefficient and Karl Pearson with the formula used today.
Types of correlation
Types of correlation
-
By direction of change
- Positive: both move the same way (household income and expenditure)
- Negative: they move in opposite ways (price and quantity demanded)
-
By number of variables
- Simple: two variables
- Multiple: three or more studied together, e.g. quantity demanded depending on own price, other goods' prices, tastes and income
- Partial: two variables studied, others held constant
-
By constancy of the ratio of change
- Linear: change in one bears a constant ratio to change in the other, as in Y = a + bX
- Non-linear: the ratio is not constant, as in Y = a + bX²
Methods of studying correlation
- Scatter diagram: plot each (X, Y) pair as a point. Points rising from left to right show positive correlation; falling, negative; scattered with no pattern, no correlation. Points close to a line show a high degree; loosely spread, a low degree. It is simple and not affected by extreme items, but it shows only direction and a rough degree, not an exact value.
- Graphic method: draw the curves of X and Y over time on one graph; if they move in the same direction, correlation is positive; if in opposite directions, negative.
- Karl Pearson's coefficient of correlation (r).
- Method of least squares.
The first two are diagrammatic; the last two are mathematical. Pearson's r measures the degree of linear relationship between two variables. It always lies between −1 and +1, and it is independent of the change of origin and of the unit of measurement.
Direct: r = [NΣXY − (ΣX)(ΣY)] ÷ √{[NΣX² − (ΣX)²][NΣY² − (ΣY)²]}. Actual mean: r = Σxy ÷ √(Σx² × Σy²), with x = X − X̄, y = Y − Ȳ. Assumed mean: r = [NΣdxdy − (Σdx)(Σdy)] ÷ √{[NΣdx² − (Σdx)²][NΣdy² − (Σdy)²]}. Always −1 ≤ r ≤ +1.
Worked example 1: direct method
Made-up data: advertising spending X (₹ thousand) and sales Y (₹ lakh) of a firm over five months.
| X | Y | XY | X² | Y² |
|---|---|---|---|---|
| 2 | 5 | 10 | 4 | 25 |
| 4 | 9 | 36 | 16 | 81 |
| 6 | 10 | 60 | 36 | 100 |
| 8 | 14 | 112 | 64 | 196 |
| 10 | 17 | 170 | 100 | 289 |
| ΣX = 30 | ΣY = 55 | ΣXY = 388 | ΣX² = 220 | ΣY² = 691 |
Numerator: NΣXY − ΣXΣY = 5 × 388 − 30 × 55 = 1,940 − 1,650 = 290. Denominator: NΣX² − (ΣX)² = 5 × 220 − 900 = 1,100 − 900 = 200; NΣY² − (ΣY)² = 5 × 691 − 3,025 = 3,455 − 3,025 = 430; √(200 × 430) = √86,000 ≈ 293.26. r = 290 ÷ 293.26 ≈ +0.99. Interpretation: a very high positive correlation: months with more advertising had higher sales.
Worked example 2: actual mean method
Made-up data: price X (₹) and quantity demanded Y (units): X = 1, 3, 5, 7, 9 and Y = 10, 8, 7, 4, 1. Means: X̄ = 25 ÷ 5 = 5, Ȳ = 30 ÷ 5 = 6.
| X | Y | x = X − 5 | y = Y − 6 | x² | y² | xy |
|---|---|---|---|---|---|---|
| 1 | 10 | −4 | 4 | 16 | 16 | −16 |
| 3 | 8 | −2 | 2 | 4 | 4 | −4 |
| 5 | 7 | 0 | 1 | 0 | 1 | 0 |
| 7 | 4 | 2 | −2 | 4 | 4 | −4 |
| 9 | 1 | 4 | −5 | 16 | 25 | −20 |
| Σx = 0 | Σy = 0 | Σx² = 40 | Σy² = 50 | Σxy = −44 |
r = Σxy ÷ √(Σx² × Σy²) = −44 ÷ √(40 × 50) = −44 ÷ √2,000 = −44 ÷ 44.72 ≈ −0.98. Interpretation: a very high negative correlation, as the law of demand leads us to expect.
Worked example 3: assumed mean method
Made-up data: X = 12, 15, 18, 20, 25, 30 and Y = 40, 44, 50, 49, 58, 65. Take A = 20 for X and B = 50 for Y, so dx = X − 20 and dy = Y − 50.
| dx | dy | dx² | dy² | dxdy |
|---|---|---|---|---|
| −8 | −10 | 64 | 100 | 80 |
| −5 | −6 | 25 | 36 | 30 |
| −2 | 0 | 4 | 0 | 0 |
| 0 | −1 | 0 | 1 | 0 |
| 5 | 8 | 25 | 64 | 40 |
| 10 | 15 | 100 | 225 | 150 |
| Σdx = 0 | Σdy = 6 | Σdx² = 218 | Σdy² = 426 | Σdxdy = 300 |
Numerator: 6 × 300 − 0 × 6 = 1,800. Denominator: 6 × 218 − 0² = 1,308 and 6 × 426 − 6² = 2,556 − 36 = 2,520; √1,308 ≈ 36.17 and √2,520 ≈ 50.20; product ≈ 1,815.5. r = 1,800 ÷ 1,815.5 ≈ +0.99: a very high positive correlation.
Key takeaways: correlation is positive or negative (direction), simple, multiple or partial (number of variables), linear or non-linear (ratio of change). The scatter diagram shows direction and rough degree; Pearson's r gives the exact degree of linear relationship, always between −1 and +1, by the direct, actual mean or assumed mean method. Always interpret the sign and the size of r.
Check your understanding
-
1. If two variables both rise or both fall together, the correlation is:
- negative
- zero
- positive
- partial
Show answer
Answer: C. Movement in the same direction is positive correlation, like household income and expenditure.
-
2. Studying the relation between crop yield and fertiliser while keeping rainfall constant is an example of:
- partial correlation
- simple correlation
- multiple correlation
- non-linear correlation
Show answer
Answer: A. When more than two variables are involved but only two are studied with the others held constant, the correlation is partial.
-
3. Pearson's coefficient of correlation always lies between:
- 0 and 1
- −1 and 0
- −0.5 and +0.5
- −1 and +1
Show answer
Answer: D. r ranges from −1 (perfect negative) through 0 (no linear relation) to +1 (perfect positive).
-
4. Made-up data: Σxy = 18, Σx² = 16 and Σy² = 36 (deviations from actual means). Find r.
- 0.50
- 0.75
- 1.125
- 0.0313
Show answer
Answer: B. r = Σxy ÷ √(Σx² × Σy²) = 18 ÷ √(16 × 36) = 18 ÷ √576 = 18 ÷ 24 = 0.75. A value above 1, like 1.125, is impossible for r.
-
5. Which is a limitation of the scatter diagram method?
- It is a mathematical method
- It is affected by extreme items
- It cannot give the exact degree of correlation
- It cannot show the direction of correlation
Show answer
Answer: C. A scatter diagram shows the direction and whether correlation is high or low, but not its exact numerical degree. It is non-mathematical and not affected by extreme items.
Sign in to keep track of the lessons you finish.