1. Meaning and types of correlation
Correlation is the degree and direction of the linear relationship between two variables. It is positive when the variables move in the same direction (both rise and fall together) and negative when they move in opposite directions. It is linear when the dots of a scatter diagram lie around a straight line and non-linear when they follow a curve.
Imagined examples: temperature and cold drink sales at a juice corner (positive); temperature and hot soup sales at a hill stall (negative); shoe size and marks of students (no correlation).
| Kind | Meaning | Imagined example |
|---|---|---|
| Positive | The variables rise and fall together | Temperature and cold drink sales at a juice corner |
| Negative | One rises while the other falls | Temperature and hot soup sales at a hill stall |
| Linear | The dots lie around a straight line | Hours of study and marks of a class |
| Non-linear | The dots follow a curve | Temperature and electricity use in a hill town |
| None | The dots show no pattern | Shoe size and marks of students |
Key terms
- Correlation
The degree and direction of the linear relationship between two variables.
- Positive correlation
A relation in which the variables rise and fall together.
- Negative correlation
A relation in which one variable rises as the other falls.
- Linear correlation
A relation in which the paired values lie around a straight line.
2. Scatter diagram
A scatter diagram plots one dot for each pair of values, with one variable on each axis. It shows the direction of the relation (rising or falling) and its closeness (how near the dots lie to a line).
Perfect positive correlation puts all dots on a rising line (coefficient 1); perfect negative on a falling line (−1); high correlation puts the dots close to a line; low correlation spreads them; no correlation shows no pattern (about 0). In the imagined sets of seven dots drawn here the coefficients are 0.86, −0.86, 0.25 and 0.
| Degree | The dots | Coefficient |
|---|---|---|
| Perfect positive | All on one rising straight line | 1 |
| High positive | Close to a rising line | 0.86 |
| Low positive | Widely spread, rising a little | 0.25 |
| No correlation | No direction at all | 0 |
| High negative | Close to a falling line | −0.86 |
| Perfect negative | All on one falling straight line | −1 |
Key terms
- Scatter diagram
A graph with one dot for each pair of values of two variables.
- Perfect correlation
A relation in which all dots lie exactly on one straight line, giving a coefficient of +1 or −1.
3. Correlation and causation
A high correlation does not prove that one variable causes the other. A third variable may affect both (in an imagined seaside town, hot weather raises both ice cream sales and sunburn: the coefficient for the imagined five months is 0.96), the link may be chance, or the direction of influence may be the reverse. A link caused by chance or by a third variable is a spurious correlation.
| Reason | Imagined case |
|---|---|
| A third variable | Hot weather raises both ice cream sales and sunburn in a seaside town |
| Chance | Two unrelated series that happen to rise together over a few years |
| Reverse direction | Do firms advertise more because sales are high, or are sales high because of advertising? |
Key terms
- Causation
A relation in which a change in one variable produces a change in the other.
- Spurious correlation
A correlation between variables that arises from chance or from a common third factor and not from a real connection between them.
4. Properties of the coefficient
- It lies between −1 and +1.
- It has no unit.
- It is not affected by a change of origin or scale: adding the same number to every value, or multiplying or dividing every value by the same positive number, leaves it unchanged. Multiplying one variable by a negative number reverses its sign.
- A coefficient of 0 shows no linear relation; a curved relation may still exist (for the imagined temperature and electricity use of Himgiri the coefficient is 0 although the dots form a U).
For the imagined Lotus Valley data the coefficient is 0.8; after adding 2 to the hours it is 0.8, and after dividing the marks by 5 it is 0.8.
| Property | What it means |
|---|---|
| Limits | It always lies between −1 and +1 |
| No unit | It is a pure number, because the units of the two variables cancel |
| Origin | Adding or subtracting the same number from every value does not change it |
| Scale | Multiplying or dividing every value by a positive number does not change it |
| Sign and size | The sign shows direction; the distance from zero shows strength |
| Version of the data | Coefficient |
|---|---|
| Original hours and marks | 0.8 |
| Hours increased by 2 | 0.8 |
| Marks divided by 5 | 0.8 |
| x = 10 × hours + 3 and y = marks ÷ 5 | 0.8 |
| u = hours − 6 and v = (marks − 55) ÷ 5 | 0.8 |
| Hours multiplied by −1 | −0.8 |
| Temperature | Use (units) | x minus mean | y minus mean | Product of deviations | Square of x | Square of y |
|---|---|---|---|---|---|---|
| 12 | 26 | -12 | 10 | -120 | 144 | 100 |
| 16 | 16 | -8 | 0 | 0 | 64 | 0 |
| 20 | 10 | -4 | -6 | 24 | 16 | 36 |
| 24 | 8 | 0 | -8 | 0 | 0 | 64 |
| 28 | 10 | 4 | -6 | -24 | 16 | 36 |
| 32 | 16 | 8 | 0 | 0 | 64 | 0 |
| 36 | 26 | 12 | 10 | 120 | 144 | 100 |
| 168 | 112 | 0 | 0 | 0 | 448 | 336 |
Key terms
- Change of origin
Adding or subtracting the same number from every value of a variable.
- Change of scale
Multiplying or dividing every value of a variable by the same number.
- Non-linear relation
A relation in which the paired values follow a curve and not a straight line.
5. Karl Pearson's coefficient
r = Σxy ÷ √(Σx² × Σy²), where x and y are the deviations of the two series from their means. Work in a table of deviations, products and squares.
For the imagined Lotus Valley students: Σxy = 40, Σx² = 10, Σy² = 250, so r = 40 ÷ 50 = 0.8.
The actual-value form is r = (nΣxy − ΣxΣy) ÷ √[(nΣx² − (Σx)²)(nΣy² − (Σy)²)]; for the same data it gives 200 ÷ √(50 × 1250) = 0.8. The sign of Σxy is the sign of r.
| Hours (x) | Marks (y) | x minus mean | y minus mean | Product of deviations | Square of x | Square of y |
|---|---|---|---|---|---|---|
| 4 | 50 | -2 | -5 | 10 | 4 | 25 |
| 5 | 45 | -1 | -10 | 10 | 1 | 100 |
| 6 | 55 | 0 | 0 | 0 | 0 | 0 |
| 7 | 65 | 1 | 10 | 10 | 1 | 100 |
| 8 | 60 | 2 | 5 | 10 | 4 | 25 |
| 30 | 275 | 0 | 0 | 40 | 10 | 250 |
| Symbol | Meaning |
|---|---|
| x | A value of the first variable minus the mean of the first variable |
| y | A value of the second variable minus the mean of the second variable |
| Σxy | The sum of the products of the paired deviations |
| Σx² and Σy² | The sums of the squared deviations of each variable |
| r | Σxy divided by the square root of Σx² times Σy² |
| Quantity | Working | Value |
|---|---|---|
| n | Number of pairs | 5 |
| Σx and Σy | 4, 5, 6, 7, 8 and 50, 45, 55, 65, 60 added | 30 and 275 |
| Σxy | Sum of each hours value times its marks value | 1690 |
| Σx² and Σy² | Sums of squares of the actual values | 190 and 15375 |
| n Σxy − Σx Σy | 5 × 1690 − 30 × 275 | 200 |
| n Σx² − (Σx)² | 5 × 190 − 30² | 50 |
| n Σy² − (Σy)² | 5 × 15375 − 275² | 1250 |
| Coefficient | 200 ÷ √(50 × 1250) | 0.8 |
| Price (Rs) | Quantity (kg) | x minus mean | y minus mean | Product of deviations | Square of x | Square of y |
|---|---|---|---|---|---|---|
| 120 | 50 | -20 | 10 | -200 | 400 | 100 |
| 130 | 35 | -10 | -5 | 50 | 100 | 25 |
| 140 | 40 | 0 | 0 | 0 | 0 | 0 |
| 150 | 45 | 10 | 5 | 50 | 100 | 25 |
| 160 | 30 | 20 | -10 | -200 | 400 | 100 |
| 700 | 200 | 0 | 0 | -300 | 1000 | 250 |
Key terms
- Karl Pearson's coefficient
A measure of the degree and direction of the linear relationship between two variables, equal to Σxy divided by the square root of Σx² times Σy², with deviations from the means.
- Deviation
The difference between a value and the arithmetic mean of its series.
6. Spearman's rank correlation
rs = 1 − 6ΣD² ÷ (n³ − n), where D is the difference between the two ranks of an item and n is the number of items. Rank 1 is given to the highest value. It is used for qualitative data that can only be ranked and when extreme values are present. The differences D always add up to zero.
Repeated ranks: tied values get the average of the ranks they cover, and for each group of m tied items (m³ − m) ÷ 12 is added to ΣD²: rs = 1 − 6[ΣD² + Σ(m³ − m) ÷ 12] ÷ (n³ − n). Imagined examples: two judges of a debate give rs = 0.8; six students with one tied pair give ΣD² = 6.5, correction 0.5 and rs = 0.8.
| Player | Score | Place in order | Rank |
|---|---|---|---|
| Player 1 | 48 | 2 | 2 |
| Player 2 | 35 | 3–5 | 4 |
| Player 3 | 35 | 3–5 | 4 |
| Player 4 | 62 | 1 | 1 |
| Player 5 | 20 | 6 | 6 |
| Player 6 | 35 | 3–5 | 4 |
| Contestant | First judge | Second judge | D | D squared |
|---|---|---|---|---|
| Meera | 3 | 2 | 1 | 1 |
| Karan | 1 | 1 | 0 | 0 |
| Tara | 4 | 5 | -1 | 1 |
| Imran | 2 | 3 | -1 | 1 |
| Nisha | 5 | 4 | 1 | 1 |
| Total | 0 | 4 |
| Tied group of m items | m cubed minus m | Correction factor |
|---|---|---|
| 2 | 6 | 0.5 |
| 3 | 24 | 2 |
| 4 | 60 | 5 |
| Student | Monday | Friday | Rank Monday | Rank Friday | D | D squared |
|---|---|---|---|---|---|---|
| 1 | 72 | 74 | 2 | 2 | 0 | 0 |
| 2 | 65 | 64 | 3.5 | 4 | -0.5 | 0.25 |
| 3 | 65 | 57 | 3.5 | 5 | -1.5 | 2.25 |
| 4 | 80 | 80 | 1 | 1 | 0 | 0 |
| 5 | 58 | 70 | 5 | 3 | 2 | 4 |
| 6 | 50 | 40 | 6 | 6 | 0 | 0 |
| Total | 6.5 |
Key terms
- Rank correlation coefficient
A measure of the agreement between two rankings of the same items.
- Correction factor
The amount (m³ − m) ÷ 12 added to ΣD² for each group of m items with repeated ranks.
7. Interpretation and choice of measure
As a rough guide, a value near +1 shows a very strong positive relation (for example +0.9), a value of about +0.3 a weak positive one, a value near 0 no linear relation, and a value such as −0.7 a fairly strong negative one. These bands are not fixed rules, and no value alone proves cause.
Use Karl Pearson's coefficient for exactly measured values and rank correlation for ranks, qualitative data and data with extreme values. For five imagined shops, one with very large sales, Karl Pearson's coefficient is 0.75 and rank correlation is 1.
| Value | A common reading |
|---|---|
| +1 | Perfect positive |
| +0.9 | Very strong positive |
| +0.3 | Weak positive |
| 0 | No linear relation |
| −0.7 | Fairly strong negative |
| −1 | Perfect negative |
| Point | Karl Pearson's coefficient | Rank correlation |
|---|---|---|
| Data | Measured values | Ranks, or qualitative data |
| Uses | Deviations from the means | Differences of ranks |
| Extreme values | Affects it strongly | Affects it little |
| Imagined shops | 0.75 | 1 |
Key terms
- Extreme value
A value far from the others in a series, which can distort a measure based on deviations from the mean.
Exam tips
- Define correlation as the degree and direction of the linear relationship between two variables.
- Read a scatter diagram for direction and closeness; never claim that correlation proves cause.
- The coefficient lies between −1 and +1, has no unit and ignores a change of origin and scale.
- For Karl Pearson: formula first, then a table of deviations, products and squares, with column totals.
- For rank correlation: rank from the highest, check that ΣD = 0, add (m³ − m) ÷ 12 for each tied group.
- Finish every computation with a sentence on sign and strength.