Week 2 · Pearson’s linear correlation coefficient: the formula, the table of x, y, x², y² and xy, and finding r from given sums · 3 lessons
3
Finding r from given sums, a perfect correlation (r = 1 or r = −1) and checking an answer with a calculator
Statistics Sec 3 Term 1, Unit 1, Lesson 1
GoalFind r when the five sums are given, recognise a perfect correlation, and check a result with the statistics mode of a calculator.
New words
given sums · n and the five sums are told, so no table is neededperfect correlation · r = 1 or r = −1: all dots are on one linestatistics mode · a calculator mode that takes pairs and returns r
Explanation
Often the question gives n and the five sums, and the calculation is just a substitution. Always check three things at the end: the sign of r agrees with the sign of the numerator, |r| is not greater than 1, and the size fits the picture of the dots. A perfect correlation appears when the numerator equals the product of the two roots exactly, because then the fraction is 1 or −1. The sums n = 6, Σx = 28, Σy = 78, Σxy = 500, Σx² = 176, Σy² = 1422 give the numerator 6 × 500 − 28 × 78 = 816 and the roots √272 and √2448, whose product is √665856 = 816; so r = 1. A calculator can check your work: put it into its statistics mode for two variables, enter the pairs and read r. The calculator and your hand value should agree, perhaps except in the last decimal because of rounding; if they differ much, look for a slip such as Σx² against (Σx)², a lost minus sign or a mistyped pair. Remember too that r = 0 says only that there is no straight-line correlation.
n
Σx
Σy
Σxy
Σx²
Σy²
6
28
78
500
176
1422
Worked examples
Sums given: n = 8, Σx = 56, Σy = 62, Σxy = 373, Σx² = 452, Σy² = 548. Numerator 8 × 373 − 56 × 62 = 2984 − 3472 = −488. Roots √(8 × 452 − 56²) = √480 and √(8 × 548 − 62²) = √540. Then r = −488 ÷ (√480 × √540) = −488 ÷ 509.12 = −0.9585: a strong inverse correlation. The sign of r is the sign of the numerator.
Perfect inverse: n = 6, Σx = 34, Σy = 52, Σxy = 204, Σx² = 238, Σy² = 632. Numerator 6 × 204 − 34 × 52 = −544; roots √272 and √1088, whose product is √295936 = 544. So r = −544 ÷ 544 = −1: every dot is on a falling line (here y = 20 − 2x).
Two facts about r. (a) Changing units does not change r: for the rehearsal data, if x is written as 10, 20, 30, 40, 50 the sums become Σx = 150, Σxy = 870, Σx² = 5500 and r = 600 ÷ √(5000 × 80) = 0.9487, as before. (b) r = 0 does not mean “no relation”: the four pairs (−3, 9), (−1, 1), (1, 1), (3, 9) give Σx = 0 and Σxy = 0, so r = 0, yet y is exactly x². The dots form a U, not a line.
Class activity
Choose any three numbers for x and set y = 2x + 5. Find the five sums, the numerator and the two roots, and show that r = 1. Then change one y-value a little and see how r moves away from 1. If you have a calculator, check both results in its statistics mode.
Practice
1
Find r when n = 5, Σx = 25, Σy = 40, Σxy = 236, Σx² = 155, Σy² = 370.