x̄ = 3, ȳ = 16 ÷ 5 = 3.2, so a = 3.2 − (−1)(3) = 6.2.
The equation is ŷ = 6.2 − x.
When x = 4 ŷ = 6.2 − 4 = 2.2.
Example 3 Hours of study (x) and exam score (y) for six students: x: 1, 2, 3, 4, 5, 6 and y: 40, 46, 47, 55, 58, 62. Find the regression equation, then estimate the score of a student who studied 4.5 hours and the score of a student who studied 10 hours.
When x = 4.5 (inside the data range): ŷ = 35.93 + 19.8 ≈ 55.7 marks.
When x = 10 (outside the data range) ŷ = 35.93 + 44 ≈ 79.9. This is less reliable because it is extrapolation.
Example 4 Find the regression equation for x: 3, 5, 7, 9 and y: 12, 10, 6, 2. Then find ŷ when x = 6, and when x = 11, and discuss whether the second result is sensible.