Using the regression line
Answers are for parents and teachers.
1
A farmer records the fertiliser x (kg per hectare) and the yield y (tonnes per hectare): x = 20, 40, 50, 70, 80, 100 and y = 12, 17, 18, 24, 25, 31. Find the line of y on x, predict the yield for 60 kg and find the error at x = 70.
| x | 20 | 40 | 50 | 70 | 80 | 100 |
|---|---|---|---|---|---|---|
| y | 12 | 17 | 18 | 24 | 25 | 31 |
Σx = 360, Σy = 127, Σxy = 8600, Σx² = 25800. b = (51600 − 45720) ÷ (154800 − 129600) = 5880 ÷ 25200 = 0.2333; a = (127 − 0.2333 × 360) ÷ 6 = 7.17. Line ŷ = 7.17 + 0.2333x. At 60 kg: 21.17 tonnes. At x = 70: ŷ = 23.5 and the error is |24 − 23.5| = 0.5 tonne.
2
A water tank slowly leaks. The change of its level y (cm) is measured after x = 2, 4, 6, 8, 10 hours: y = −1.5, −3.1, −4.4, −6.2, −7.4. Find the line, predict the change after 6 hours and find the error against the measured value.
| x | 2 | 4 | 6 | 8 | 10 |
|---|---|---|---|---|---|
| y | −1.5 | −3.1 | −4.4 | −6.2 | −7.4 |
Σx = 30, Σy = −22.6, Σxy = −165.4, Σx² = 220. b = (5 × (−165.4) + 30 × 22.6) ÷ (1100 − 900) = −149 ÷ 200 = −0.745; a = (−22.6 + 0.745 × 30) ÷ 5 = −0.05. Line ŷ = −0.05 − 0.745x. After 6 hours: ŷ = −0.05 − 4.47 = −4.52 cm; the measured value was −4.4, so the error is |−4.4 − (−4.52)| = 0.12 cm.
3
Given n = 7, Σx = 51, Σy = 136, Σxy = 1087, Σx² = 435, Σy² = 2804 (x = posters displayed, y = visitors to a school stall), find r and the line of y on x.
Numerator 7 × 1087 − 51 × 136 = 673; roots 7 × 435 − 51² = 444 and 7 × 2804 − 136² = 1132. r = 673 ÷ √(444 × 1132) = 0.9493; b = 673 ÷ 444 = 1.5158; a = (136 − 1.5158 × 51) ÷ 7 = 8.385. Line ŷ = 8.385 + 1.5158x.
4
A line ŷ = 12 − 2.5x was built from used tablets aged 1 to 4 years (x) and their prices in thousand LE (y). What does it predict at age 8? Why is the answer not believable?
ŷ = 12 − 20 = −8 thousand LE, a negative price. Age 8 is far outside the data (1 to 4 years) and a price cannot be below 0, so the line cannot be trusted there.
5
For the line ŷ = 4 + 0.8x, find the error at the dot (5, 9), and say whether r is positive or negative.
ŷ = 4 + 4 = 8, so the error is |9 − 8| = 1. Since b = 0.8 is positive, r is positive.