Week 15 · Term 1 review: correlation and regression, quartiles and spread, probability, conditional probability and independence · 3 lessons
1
Review of Unit 1: scatter diagrams, Pearson’s and Spearman’s coefficients, and the regression line with a prediction
Statistics Sec 3 Term 1, Units 1–3, Review
GoalReview Unit 1 with new data: plot a scatter diagram, find Pearson’s r and the regression line, predict with care, and find Spearman’s r with a tie.
New words
Pearson’s r · measures a straight-line relation between two measured variablesregression line y = a + bx · the least-squares line used for prediction inside the data rangeSpearman’s r · the correlation of ranks; tied values share the mean of their places
Explanation
Unit 1 asked three questions about two variables: is there a relation, how strong is it, and can we predict with it? The scatter diagram answers the first: its shape shows the type and its narrowness shows the strength. For measured data Pearson’s r = (nΣxy − ΣxΣy) ÷ (√(nΣx² − (Σx)²) × √(nΣy² − (Σy)²)) measures the strength, and for ranks Spearman’s r = 1 − 6ΣD² ÷ n(n² − 1) does the same, with tied values taking the mean of their places. The regression line y = a + bx has b = (nΣxy − ΣxΣy) ÷ (nΣx² − (Σx)²) and a = (Σy − bΣx) ÷ n; it passes through the point of the two means, and b has the same sign as r. Here is an invented school running club. For each of ten runners, x is the number of training sessions attended in a month and y is the minutes needed for 3 km. The diagram shows the ten dots and the line y = 33.97 − 1.303x. Use such a line only for x inside the range of the data, here 2 to 11.
Worked examples
x
y
xy
x²
y²
2
31
62
4
961
3
30
90
9
900
4
28
112
16
784
5
29
145
25
841
6
26
156
36
676
7
24
168
49
576
8
25
200
64
625
9
22
198
81
484
10
21
210
100
441
11
19
209
121
361
65
255
1550
505
6649
The sums. The table gives xy, x² and y² for each runner and the totals. With n = 10: nΣxy − ΣxΣy = 15500 − 65 × 255 = −1075; nΣx² − (Σx)² = 5050 − 4225 = 825; nΣy² − (Σy)² = 66490 − 65025 = 1465. So r = −1075 ÷ √(825 × 1465) = −1075 ÷ 1099.4 ≈ −0.978: a strong inverse correlation, as the narrow falling band suggests.
The line and predictions. b = −1075 ÷ 825 ≈ −1.303 and a = (255 + 1.303 × 65) ÷ 10 ≈ 33.97, so y = 33.97 − 1.303x; b and r are both negative, as they must be. For x = 6.5 (inside the range) y ≈ 25.5 minutes, and this is the mean point because 6.5 and 25.5 are the two means. For x = 8 the line gives 23.5, and the observed 25 differs by 1.5. For x = 30 the line gives 33.97 − 39.09 ≈ −5.1 minutes, which is impossible: 30 lies far outside the data.
Poster
Stars 1
Stars 2
Rank 1
Rank 2
D
D²
P1
4
5
5.5
7
−1.5
2.25
P2
2
1
2
1
1
1
P3
5
4
7
5.5
1.5
2.25
P4
3
3
3.5
4
−0.5
0.25
P5
3
2
3.5
2.5
1
1
P6
1
2
1
2.5
−1.5
2.25
P7
4
4
5.5
5.5
0
0
Sum
0
9
Spearman with ties. Two judges give 1 to 5 stars to seven posters. Ranks run from the lowest stars up, and tied stars take the mean of their places: the two 3-star posters of judge 1 are in places 3 and 4, so each gets 3.5. The column D adds to 0 (a check) and ΣD² = 9, so r = 1 − 6 × 9 ÷ (7 × 48) = 1 − 54 ÷ 336 = 47/56 ≈ 0.839: a strong agreement.
Class activity
Draw the ten dots of the running club on squared paper and the line through the points (2, 31.4) and (11, 19.6). Check that the point (6.5, 25.5) lies on it. Then change the dot (11, 19) to (11, 31): does the dots’ band stay narrow? Guess whether r grows or shrinks, and say why a single dot can change r so much.
Practice
1
The pairs (1, 10), (2, 8), (3, 9), (4, 5), (5, 4), (6, 2). Without a formula, say the type and the strength of the correlation. Then check with Σx = 21, Σy = 38, Σxy = 105, Σx² = 91, Σy² = 290.
The dots fall in a fairly narrow band: strong and inverse. Check: r = (630 − 798) ÷ √(105 × 296) = −168 ÷ 176.3 ≈ −0.953.
2
n = 8, Σx = 40, Σy = 64, Σxy = 360, Σx² = 240, Σy² = 600. Find r and the regression line.
nΣxy − ΣxΣy = 2880 − 2560 = 320; nΣx² − (Σx)² = 1920 − 1600 = 320; nΣy² − (Σy)² = 4800 − 4096 = 704. r = 320 ÷ √(320 × 704) ≈ 0.674. b = 320 ÷ 320 = 1 and a = (64 − 40) ÷ 8 = 3, so y = 3 + x.
3
Two lists of ranks of six items have ΣD² = 10. Find Spearman’s r.