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
2
A worked table: ten pairs of marks, the five columns, the sums and the value of r with its type
Statistics Sec 3 Term 1, Unit 1, Lesson 1
GoalWork through a table of ten pairs, find the five sums and the value of r, and state the type and strength of the correlation.
New words
sum row · the last row of the table, which holds the five sumsnumerator · nΣxy − Σx·Σy, whose sign gives the type of correlationrounding · keep the sums exact and round only the final r
Explanation
A full calculation by hand has six steps. (1) Write the pairs in two columns. (2) Add three more columns, xy, x² and y². (3) Add every column to get the five sums. (4) Find the numerator nΣxy − Σx·Σy. (5) Find the two roots’ contents nΣx² − (Σx)² and nΣy² − (Σy)², and take their roots. (6) Divide, round r at the end, and say what it means. The table shows ten pupils: the hours of sleep before a quiz (x) and the quiz mark out of 20 (y). The sums are Σx = 75, Σy = 122, Σxy = 946, Σx² = 585 and Σy² = 1550. Then the numerator is 10 × 946 − 75 × 122 = 9460 − 9150 = 310, the first root is √(10 × 585 − 75²) = √225 = 15, and the second is √(10 × 1550 − 122²) = √616 = 24.82. So r = 310 ÷ (15 × 24.82) = 310 ÷ 372.3 = 0.8327.
Sleep x (h)
Mark y
xy
x²
y²
5
9
45
25
81
6
11
66
36
121
6
8
48
36
64
7
13
91
49
169
7
11
77
49
121
8
12
96
64
144
8
15
120
64
225
9
12
108
81
144
9
15
135
81
225
10
16
160
100
256
Σx = 75
Σy = 122
Σxy = 946
Σx² = 585
Σy² = 1550
Worked examples
Check one row: the pupil who slept 7 hours and scored 11 gives xy = 77, x² = 49, y² = 121. Another pupil also slept 7 hours but scored 13, so the two rows differ.
Read the result. r = 0.8327 is positive and fairly near 1: a direct, strong correlation. The pupils who slept longer tended to score higher. This does not prove that sleep alone raises marks (a calm pupil may both sleep well and revise well), but it is a useful pattern.
Rounding. If we had rounded the second root to 24.8 and the product to 372, we would get 310 ÷ 372 = 0.8333. Rounded steps change the third and fourth decimals, so we keep the sums exact and round only at the end.
Class activity
Ask five classmates the hours they slept and the minutes they needed to finish a short puzzle. Make the five columns, find r by hand, and say whether the result is what you expected.
Practice
1
Complete the row for the pair (8, 15): xy, x² and y².
xy = 120, x² = 64, y² = 225.
2
Find r for the four pairs (1, 2), (2, 3), (3, 5), (4, 6).