Frequency polygons, line graphs and scatter graphs
Week 34 · Unit 19: Interpreting and discussing results · 4 lessons
4
Lines of best fit
Coursebook 9: Unit 19, pp. 177–183
GoalDraw a line of best fit through a scatter graph with correlation, use it to estimate values, and say how reliable the estimate is.
New words
line of best fit · a straight line drawn close to the points, with about as many points on each sideoutlier · a point that is far from the pattern of the othersinterpolate and extrapolate · interpolate: estimate inside the range of the data; extrapolate: estimate outside it
Explanation
When a scatter graph shows correlation, you can draw a line of best fit to show the trend. Work out the mean of the x-values and the mean of the y-values; a good line passes through that mean point. Then use a ruler so that the line follows the direction of the points, with about the same number of points above and below it. Ignore any outlier when you place the line. To estimate a value, read across from the line. An estimate inside the range of the data (interpolation) is fairly reliable if the correlation is strong. An estimate outside the range (extrapolation) is less reliable, because the pattern may not continue. The gradient of the line tells you the rate: how much y changes for each 1 in x.
Worked examples
A pizza shop sells six sizes. Diameter (cm) and price ($): (20, 7.00), (25, 9.50), (28, 11.50), (30, 12.50), (33, 15.00), (36, 17.00). The mean diameter is 28.7 cm and the mean price is $12.08, so the line passes through (28.7, 12.1). It also passes through (18, 5.4) and (38, 18). The gradient is (18 − 5.4) ÷ 20 = 0.63, so each extra centimetre costs about 63c. A 31 cm pizza: 12.1 + 0.63 × 2.3 ≈ $13.55 (about $13.60). A 45 cm pizza would be about $22.40, but 45 is outside the data, so this is less reliable.
Climbers record the height of six campsites (km above sea level) and the temperature (°C): (0.2, 24), (0.5, 22), (0.9, 19), (1.4, 15), (1.8, 12), (2.3, 9). The correlation is strongly negative. A line of best fit through the mean point (1.18, 16.8) passes through (0, 25.5) and (2.5, 7.2). Its gradient is (7.2 − 25.5) ÷ 2.5 = −7.3 °C per km: the temperature falls about 7.3 °C for every extra kilometre of height. At 1.1 km the line gives about 17.4 °C.
A web designer records the number of adverts on a page and its loading time in seconds: (2, 1.1), (4, 1.6), (5, 2.0), (7, 2.4), (9, 3.2), (10, 3.4), (12, 4.1) and (6, 4.5). The point (6, 4.5) is an outlier: it is far from the others. Perhaps that page has a large video. Draw the line using the other seven points; it passes through (0, 0.4) and (14, 4.6). For 8 adverts it gives 0.4 + 0.3 × 8 = 2.8 seconds. The outlier is kept in the data but does not decide where the line goes.
Class activity
Spaghetti line. Use the hand-span and foot-length data from the last lesson. Plot it on squared paper. Lay a strand of dry spaghetti on the graph and move it until it follows the points, with about as many points above as below. Draw along it. Use your line to estimate the foot length of a person with a hand span of 19 cm. Compare your line with a friend’s: how different are the estimates?
Practice
1
The scatter graph shows the mass of a puppy (kg) against its age (weeks), with a line of best fit through (2, 0.5) and (16, 7.0). Use the line to estimate the mass at 9 weeks and the age when the puppy has mass 5 kg. Find the gradient and say what it means.
At 9 weeks the line is at 0.5 + 7 × (6.5 ÷ 14) ≈ 3.75, about 3.8 kg. For 5 kg the age is about 11.7, so about 12 weeks. Gradient = 6.5 ÷ 14 ≈ 0.46: the puppy gains about 0.46 kg each week.
2
A spring’s length (cm) was measured with different masses (g) hanging from it: (0, 10.1), (50, 11.9), (100, 13.8), (150, 16.2), (200, 17.9), (250, 20.2), (300, 22.0). Draw the scatter graph and a line of best fit. Estimate the length with 175 g and the gradient. What does the point where the line meets the length axis mean?
The points are almost on a straight line (strong positive correlation). A good line is length = 10 + 0.04 × mass. With 175 g: 10 + 7 = 17 cm. Gradient 0.04 cm per gram. The line meets the length axis at about 10 cm, which is the length of the spring with nothing hanging on it.
3
For children aged 5 to 12 a line of best fit for height is h = 6x + 75, where h is in cm and x is the age in years. Use it to predict the height at age 9 and at age 40. Which prediction can you trust more? Explain.
Age 9: 6 × 9 + 75 = 129 cm. Age 40: 6 × 40 + 75 = 315 cm. The first is inside the range 5 to 12, so it is reliable. The second is far outside the range and impossible, because people stop growing.
4
Set A: (1, 2), (2, 4.1), (3, 5.9), (4, 8), (5, 10.1), (6, 11.9). Set B: (1, 3), (2, 9), (3, 4), (4, 10), (5, 6), (6, 11). Which set has the stronger correlation? Which would give a more reliable line of best fit? Explain.
Set A: the points lie almost exactly on a line with gradient 2, so the correlation is very strong and its line gives reliable estimates. Set B goes up on average but the points jump about (for example 9 then 4), so the correlation is much weaker and estimates would be unreliable.