IB AA · 6D Correlation and Regression
Find the gradient from the deviations, then write the line through the mean point.
Gradient
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
Through the mean
y − ȳ = a(x − x̄). The line passes through the mean point.
Then expand
Multiply out and simplify to y = ax + b.
The mean of y
If the line and the mean of x are known, substitute the mean of x. The result is the mean of y.
The points lie on the line. The gradient is an integer.
| x | y |
|---|---|
| 1 | 0 |
| 2 | 2 |
| 3 | 4 |
| 5 | 8 |
| 6 | 10 |
| 7 | 12 |
Mean of x = sum of the valuesnumber of values
Sum = 1 + 2 + 3 + 5 + 6 + 7
Sum = 24
There are 6 values.
Mean of x = 246
Mean of x = 4
Mean of y = sum of the valuesnumber of values
Sum = 0 + 2 + 4 + 8 + 10 + 12
Sum = 36
There are 6 values.
Mean of y = 366
Mean of y = 6
The mean point is (4, 6).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 1 | 0 | −3 | −6 | 18 | 9 |
| 2 | 2 | −2 | −4 | 8 | 4 |
| 3 | 4 | −1 | −2 | 2 | 1 |
| 5 | 8 | 1 | 2 | 2 | 1 |
| 6 | 10 | 2 | 4 | 8 | 4 |
| 7 | 12 | 3 | 6 | 18 | 9 |
Sum of (x − x̄)(y − ȳ) = 18 + 8 + 2 + 2 + 8 + 18
Sum of (x − x̄)(y − ȳ) = 56
Sum of (x − x̄)² = 9 + 4 + 1 + 1 + 4 + 9
Sum of (x − x̄)² = 28
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = 5628
a = 2
y − 6 = 2(x − 4)
y − 6 = 2x − 8
y = 2x − 8 + 6
y = 2x − 2
Check: at x = 4, y = 6. The line passes through the mean point.
Answer: y = 2x − 2
| x | y |
|---|---|
| 3 | 24 |
| 4 | 23 |
| 5 | 22 |
| 7 | 20 |
| 8 | 19 |
| 9 | 18 |
Mean of x = sum of the valuesnumber of values
Sum = 3 + 4 + 5 + 7 + 8 + 9
Sum = 36
There are 6 values.
Mean of x = 366
Mean of x = 6
Mean of y = sum of the valuesnumber of values
Sum = 24 + 23 + 22 + 20 + 19 + 18
Sum = 126
There are 6 values.
Mean of y = 1266
Mean of y = 21
The mean point is (6, 21).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 3 | 24 | −3 | 3 | −9 | 9 |
| 4 | 23 | −2 | 2 | −4 | 4 |
| 5 | 22 | −1 | 1 | −1 | 1 |
| 7 | 20 | 1 | −1 | −1 | 1 |
| 8 | 19 | 2 | −2 | −4 | 4 |
| 9 | 18 | 3 | −3 | −9 | 9 |
Sum of (x − x̄)(y − ȳ) = −9 − 4 − 1 − 1 − 4 − 9
Sum of (x − x̄)(y − ȳ) = −28
Sum of (x − x̄)² = 9 + 4 + 1 + 1 + 4 + 9
Sum of (x − x̄)² = 28
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = −2828
a = −1
y − 21 = −(x − 6)
y − 21 = −x + 6
y = −x + 6 + 21
y = −x + 27
Check: at x = 6, y = 21. The line passes through the mean point.
Answer: y = −x + 27
| x | y |
|---|---|
| 2 | 3 |
| 3 | 6 |
| 4 | 9 |
| 5 | 12 |
| 6 | 15 |
| 7 | 18 |
| 8 | 21 |
Mean of x = sum of the valuesnumber of values
Sum = 2 + 3 + 4 + 5 + 6 + 7 + 8
Sum = 35
There are 7 values.
Mean of x = 357
Mean of x = 5
Mean of y = sum of the valuesnumber of values
Sum = 3 + 6 + 9 + 12 + 15 + 18 + 21
Sum = 84
There are 7 values.
Mean of y = 847
Mean of y = 12
The mean point is (5, 12).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 2 | 3 | −3 | −9 | 27 | 9 |
| 3 | 6 | −2 | −6 | 12 | 4 |
| 4 | 9 | −1 | −3 | 3 | 1 |
| 5 | 12 | 0 | 0 | 0 | 0 |
| 6 | 15 | 1 | 3 | 3 | 1 |
| 7 | 18 | 2 | 6 | 12 | 4 |
| 8 | 21 | 3 | 9 | 27 | 9 |
Sum of (x − x̄)(y − ȳ) = 27 + 12 + 3 + 0 + 3 + 12 + 27
Sum of (x − x̄)(y − ȳ) = 84
Sum of (x − x̄)² = 9 + 4 + 1 + 0 + 1 + 4 + 9
Sum of (x − x̄)² = 28
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = 8428
a = 3
y − 12 = 3(x − 5)
y − 12 = 3x − 15
y = 3x − 15 + 12
y = 3x − 3
Check: at x = 5, y = 12. The line passes through the mean point.
Answer: y = 3x − 3
| x | y |
|---|---|
| 6 | 28 |
| 7 | 26 |
| 8 | 24 |
| 8 | 24 |
| 9 | 22 |
| 10 | 20 |
Mean of x = sum of the valuesnumber of values
Sum = 6 + 7 + 8 + 8 + 9 + 10
Sum = 48
There are 6 values.
Mean of x = 486
Mean of x = 8
Mean of y = sum of the valuesnumber of values
Sum = 28 + 26 + 24 + 24 + 22 + 20
Sum = 144
There are 6 values.
Mean of y = 1446
Mean of y = 24
The mean point is (8, 24).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 6 | 28 | −2 | 4 | −8 | 4 |
| 7 | 26 | −1 | 2 | −2 | 1 |
| 8 | 24 | 0 | 0 | 0 | 0 |
| 8 | 24 | 0 | 0 | 0 | 0 |
| 9 | 22 | 1 | −2 | −2 | 1 |
| 10 | 20 | 2 | −4 | −8 | 4 |
Sum of (x − x̄)(y − ȳ) = −8 − 2 + 0 + 0 − 2 − 8
Sum of (x − x̄)(y − ȳ) = −20
Sum of (x − x̄)² = 4 + 1 + 0 + 0 + 1 + 4
Sum of (x − x̄)² = 10
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = −2010
a = −2
y − 24 = −2(x − 8)
y − 24 = −2x + 16
y = −2x + 16 + 24
y = −2x + 40
Check: at x = 8, y = 24. The line passes through the mean point.
Answer: y = −2x + 40
| x | y |
|---|---|
| 0 | 6 |
| 1 | 7 |
| 2 | 8 |
| 3 | 9 |
| 4 | 10 |
| 5 | 11 |
| 6 | 12 |
Mean of x = sum of the valuesnumber of values
Sum = 0 + 1 + 2 + 3 + 4 + 5 + 6
Sum = 21
There are 7 values.
Mean of x = 217
Mean of x = 3
Mean of y = sum of the valuesnumber of values
Sum = 6 + 7 + 8 + 9 + 10 + 11 + 12
Sum = 63
There are 7 values.
Mean of y = 637
Mean of y = 9
The mean point is (3, 9).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 0 | 6 | −3 | −3 | 9 | 9 |
| 1 | 7 | −2 | −2 | 4 | 4 |
| 2 | 8 | −1 | −1 | 1 | 1 |
| 3 | 9 | 0 | 0 | 0 | 0 |
| 4 | 10 | 1 | 1 | 1 | 1 |
| 5 | 11 | 2 | 2 | 4 | 4 |
| 6 | 12 | 3 | 3 | 9 | 9 |
Sum of (x − x̄)(y − ȳ) = 9 + 4 + 1 + 0 + 1 + 4 + 9
Sum of (x − x̄)(y − ȳ) = 28
Sum of (x − x̄)² = 9 + 4 + 1 + 0 + 1 + 4 + 9
Sum of (x − x̄)² = 28
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = 2828
a = 1
y − 9 = (x − 3)
y − 9 = x − 3
y = x − 3 + 9
y = x + 6
Check: at x = 3, y = 9. The line passes through the mean point.
Answer: y = x + 6
| x | y |
|---|---|
| 7 | 4 |
| 8 | 6 |
| 9 | 8 |
| 10 | 10 |
| 10 | 10 |
| 11 | 12 |
| 12 | 14 |
| 13 | 16 |
Mean of x = sum of the valuesnumber of values
Sum = 7 + 8 + 9 + 10 + 10 + 11 + 12 + 13
Sum = 80
There are 8 values.
Mean of x = 808
Mean of x = 10
Mean of y = sum of the valuesnumber of values
Sum = 4 + 6 + 8 + 10 + 10 + 12 + 14 + 16
Sum = 80
There are 8 values.
Mean of y = 808
Mean of y = 10
The mean point is (10, 10).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 7 | 4 | −3 | −6 | 18 | 9 |
| 8 | 6 | −2 | −4 | 8 | 4 |
| 9 | 8 | −1 | −2 | 2 | 1 |
| 10 | 10 | 0 | 0 | 0 | 0 |
| 10 | 10 | 0 | 0 | 0 | 0 |
| 11 | 12 | 1 | 2 | 2 | 1 |
| 12 | 14 | 2 | 4 | 8 | 4 |
| 13 | 16 | 3 | 6 | 18 | 9 |
Sum of (x − x̄)(y − ȳ) = 18 + 8 + 2 + 0 + 0 + 2 + 8 + 18
Sum of (x − x̄)(y − ȳ) = 56
Sum of (x − x̄)² = 9 + 4 + 1 + 0 + 0 + 1 + 4 + 9
Sum of (x − x̄)² = 28
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = 5628
a = 2
y − 10 = 2(x − 10)
y − 10 = 2x − 20
y = 2x − 20 + 10
y = 2x − 10
Check: at x = 10, y = 10. The line passes through the mean point.
Answer: y = 2x − 10
The gradient is a fraction.
| x | y |
|---|---|
| 4 | 6 |
| 5 | 8 |
| 6 | 7 |
| 6 | 9 |
| 7 | 8 |
| 8 | 10 |
Mean of x = sum of the valuesnumber of values
Sum = 4 + 5 + 6 + 6 + 7 + 8
Sum = 36
There are 6 values.
Mean of x = 366
Mean of x = 6
Mean of y = sum of the valuesnumber of values
Sum = 6 + 8 + 7 + 9 + 8 + 10
Sum = 48
There are 6 values.
Mean of y = 486
Mean of y = 8
The mean point is (6, 8).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 4 | 6 | −2 | −2 | 4 | 4 |
| 5 | 8 | −1 | 0 | 0 | 1 |
| 6 | 7 | 0 | −1 | 0 | 0 |
| 6 | 9 | 0 | 1 | 0 | 0 |
| 7 | 8 | 1 | 0 | 0 | 1 |
| 8 | 10 | 2 | 2 | 4 | 4 |
Sum of (x − x̄)(y − ȳ) = 4 + 0 + 0 + 0 + 0 + 4
Sum of (x − x̄)(y − ȳ) = 8
Sum of (x − x̄)² = 4 + 1 + 0 + 0 + 1 + 4
Sum of (x − x̄)² = 10
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = 810
a = 45
y − 8 = 45(x − 6)
y − 8 = 45x − 245
y = 45x − 245 + 8
y = 45x − 245 + 405
y = 45x + 165
Check: at x = 6, y = 8. The line passes through the mean point.
Answer: y = 45x + 165
| x | y |
|---|---|
| 7 | 16 |
| 8 | 14 |
| 9 | 15 |
| 9 | 13 |
| 10 | 14 |
| 11 | 12 |
Mean of x = sum of the valuesnumber of values
Sum = 7 + 8 + 9 + 9 + 10 + 11
Sum = 54
There are 6 values.
Mean of x = 546
Mean of x = 9
Mean of y = sum of the valuesnumber of values
Sum = 16 + 14 + 15 + 13 + 14 + 12
Sum = 84
There are 6 values.
Mean of y = 846
Mean of y = 14
The mean point is (9, 14).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 7 | 16 | −2 | 2 | −4 | 4 |
| 8 | 14 | −1 | 0 | 0 | 1 |
| 9 | 15 | 0 | 1 | 0 | 0 |
| 9 | 13 | 0 | −1 | 0 | 0 |
| 10 | 14 | 1 | 0 | 0 | 1 |
| 11 | 12 | 2 | −2 | −4 | 4 |
Sum of (x − x̄)(y − ȳ) = −4 + 0 + 0 + 0 + 0 − 4
Sum of (x − x̄)(y − ȳ) = −8
Sum of (x − x̄)² = 4 + 1 + 0 + 0 + 1 + 4
Sum of (x − x̄)² = 10
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = −810
a = −45
y − 14 = −45(x − 9)
y − 14 = −45x + 365
y = −45x + 365 + 14
y = −45x + 365 + 705
y = −45x + 1065
Check: at x = 9, y = 14. The line passes through the mean point.
Answer: y = −45x + 1065
| x | y |
|---|---|
| 3 | 7 |
| 4 | 9 |
| 5 | 11 |
| 5 | 8 |
| 6 | 9 |
| 7 | 10 |
Mean of x = sum of the valuesnumber of values
Sum = 3 + 4 + 5 + 5 + 6 + 7
Sum = 30
There are 6 values.
Mean of x = 306
Mean of x = 5
Mean of y = sum of the valuesnumber of values
Sum = 7 + 9 + 11 + 8 + 9 + 10
Sum = 54
There are 6 values.
Mean of y = 546
Mean of y = 9
The mean point is (5, 9).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 3 | 7 | −2 | −2 | 4 | 4 |
| 4 | 9 | −1 | 0 | 0 | 1 |
| 5 | 11 | 0 | 2 | 0 | 0 |
| 5 | 8 | 0 | −1 | 0 | 0 |
| 6 | 9 | 1 | 0 | 0 | 1 |
| 7 | 10 | 2 | 1 | 2 | 4 |
Sum of (x − x̄)(y − ȳ) = 4 + 0 + 0 + 0 + 0 + 2
Sum of (x − x̄)(y − ȳ) = 6
Sum of (x − x̄)² = 4 + 1 + 0 + 0 + 1 + 4
Sum of (x − x̄)² = 10
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = 610
a = 35
y − 9 = 35(x − 5)
y − 9 = 35x − 3
y = 35x − 3 + 9
y = 35x + 6
Check: at x = 5, y = 9. The line passes through the mean point.
Answer: y = 35x + 6
| x | y |
|---|---|
| 9 | 9 |
| 10 | 7 |
| 11 | 5 |
| 11 | 8 |
| 12 | 7 |
| 13 | 6 |
Mean of x = sum of the valuesnumber of values
Sum = 9 + 10 + 11 + 11 + 12 + 13
Sum = 66
There are 6 values.
Mean of x = 666
Mean of x = 11
Mean of y = sum of the valuesnumber of values
Sum = 9 + 7 + 5 + 8 + 7 + 6
Sum = 42
There are 6 values.
Mean of y = 426
Mean of y = 7
The mean point is (11, 7).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 9 | 9 | −2 | 2 | −4 | 4 |
| 10 | 7 | −1 | 0 | 0 | 1 |
| 11 | 5 | 0 | −2 | 0 | 0 |
| 11 | 8 | 0 | 1 | 0 | 0 |
| 12 | 7 | 1 | 0 | 0 | 1 |
| 13 | 6 | 2 | −1 | −2 | 4 |
Sum of (x − x̄)(y − ȳ) = −4 + 0 + 0 + 0 + 0 − 2
Sum of (x − x̄)(y − ȳ) = −6
Sum of (x − x̄)² = 4 + 1 + 0 + 0 + 1 + 4
Sum of (x − x̄)² = 10
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = −610
a = −35
y − 7 = −35(x − 11)
y − 7 = −35x + 335
y = −35x + 335 + 7
y = −35x + 335 + 355
y = −35x + 685
Check: at x = 11, y = 7. The line passes through the mean point.
Answer: y = −35x + 685
| x | y |
|---|---|
| 0 | 8 |
| 1 | 10 |
| 2 | 9 |
| 2 | 11 |
| 3 | 10 |
| 4 | 12 |
Mean of x = sum of the valuesnumber of values
Sum = 0 + 1 + 2 + 2 + 3 + 4
Sum = 12
There are 6 values.
Mean of x = 126
Mean of x = 2
Mean of y = sum of the valuesnumber of values
Sum = 8 + 10 + 9 + 11 + 10 + 12
Sum = 60
There are 6 values.
Mean of y = 606
Mean of y = 10
The mean point is (2, 10).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 0 | 8 | −2 | −2 | 4 | 4 |
| 1 | 10 | −1 | 0 | 0 | 1 |
| 2 | 9 | 0 | −1 | 0 | 0 |
| 2 | 11 | 0 | 1 | 0 | 0 |
| 3 | 10 | 1 | 0 | 0 | 1 |
| 4 | 12 | 2 | 2 | 4 | 4 |
Sum of (x − x̄)(y − ȳ) = 4 + 0 + 0 + 0 + 0 + 4
Sum of (x − x̄)(y − ȳ) = 8
Sum of (x − x̄)² = 4 + 1 + 0 + 0 + 1 + 4
Sum of (x − x̄)² = 10
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = 810
a = 45
y − 10 = 45(x − 2)
y − 10 = 45x − 85
y = 45x − 85 + 10
y = 45x − 85 + 505
y = 45x + 425
Check: at x = 2, y = 10. The line passes through the mean point.
Answer: y = 45x + 425
| x | y |
|---|---|
| 6 | 15 |
| 7 | 13 |
| 8 | 14 |
| 8 | 12 |
| 9 | 13 |
| 10 | 11 |
Mean of x = sum of the valuesnumber of values
Sum = 6 + 7 + 8 + 8 + 9 + 10
Sum = 48
There are 6 values.
Mean of x = 486
Mean of x = 8
Mean of y = sum of the valuesnumber of values
Sum = 15 + 13 + 14 + 12 + 13 + 11
Sum = 78
There are 6 values.
Mean of y = 786
Mean of y = 13
The mean point is (8, 13).
| x | y | x − x̄ | y − ȳ | (x − x̄)(y − ȳ) | (x − x̄)² |
|---|---|---|---|---|---|
| 6 | 15 | −2 | 2 | −4 | 4 |
| 7 | 13 | −1 | 0 | 0 | 1 |
| 8 | 14 | 0 | 1 | 0 | 0 |
| 8 | 12 | 0 | −1 | 0 | 0 |
| 9 | 13 | 1 | 0 | 0 | 1 |
| 10 | 11 | 2 | −2 | −4 | 4 |
Sum of (x − x̄)(y − ȳ) = −4 + 0 + 0 + 0 + 0 − 4
Sum of (x − x̄)(y − ȳ) = −8
Sum of (x − x̄)² = 4 + 1 + 0 + 0 + 1 + 4
Sum of (x − x̄)² = 10
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = −810
a = −45
y − 13 = −45(x − 8)
y − 13 = −45x + 325
y = −45x + 325 + 13
y = −45x + 325 + 655
y = −45x + 975
Check: at x = 8, y = 13. The line passes through the mean point.
Answer: y = −45x + 975
The sums are given, or the line is given and the mean of y is missing.
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = 1812
a = 32
y − 11 = 32(x − 6)
y − 11 = 32x − 9
y = 32x − 9 + 11
y = 32x + 2
Answer: y = 32x + 2
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = 248
a = 3
y − 9 = 3(x − 5)
y − 9 = 3x − 15
y = 3x − 15 + 9
y = 3x − 6
Answer: y = 3x − 6
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = −2010
a = −2
y − 16 = −2(x − 4)
y − 16 = −2x + 8
y = −2x + 8 + 16
y = −2x + 24
Answer: y = −2x + 24
a = sum of (x − x̄)(y − ȳ)sum of (x − x̄)²
a = 1520
a = 34
y − 7 = 34(x − 8)
y − 7 = 34x − 6
y = 34x − 6 + 7
y = 34x + 1
Answer: y = 34x + 1
The regression line passes through the mean point.
Mean of y = 4(5) − 7
Mean of y = 20 − 7
Mean of y = 13
Answer: Mean of y = 13.
The regression line passes through the mean point.
Mean of y = 12(8) + 6
Mean of y = 4 + 6
Mean of y = 10
Answer: Mean of y = 10.
Want to go over a scatter diagram together?
Book a Session with Amy