← Back to course
Algebra 1 9-12 / Week 12 / Tuesday
2/6
Week 12 · Data From the Loft and Fair Day

Tuesday

The line that fits best
// Scatter plots, lines of best fit and the family fair
⏱ about 20 min

Tuesday: The Line That Fits Best

Wren lays three rulers across the scatter plot, each at a slightly different angle. "Which line is best?"

"They all look fine," Comet says. "How do we choose?"

"Measure the gaps," Wren says. "For each dot, how far is it above or below the line? Those are residuals."

Nova lights each gap in turn. "Would you like a hint? Square each gap, then add them up."

"Squaring makes them all positive, and big gaps count more," Comet says. "The best line has the smallest total."

"Least squares," Wren says. "Nova computes it. We read its slope and intercept and say what they mean."

"Slope 1.25. About 1.25 more meters for each extra pump," Comet says. "That is a sentence about rockets, not just a number."

Residuals

A residual is the actual value minus the value the line predicts, for one dot. Above the line it is positive, below it is negative.

Draw the residuals as little vertical sticks from each dot to the line. A good line has small sticks on both sides.

For launch 4, 5 pumps gave 7 m. The line predicts 6.4. The residual is 0.6.

Least squares

  1. For a candidate line, find every residual.
  2. Square each residual so none cancel and large gaps count more.
  3. Add the squares. That total is the line's score.
  4. The least-squares line is the one with the smallest total. Nova, or any graphing tool, finds it exactly.
LaunchPumpsHeight (m)Line predictsResidual
122.52.7-0.2
233.53.9-0.4
345.55.20.3
4576.40.6
567.57.7?
679.58.9?
789.510.2?

Slope and intercept in the data

The slope is 1.25. In the data, that means about 1.25 more meters of height for each extra pump.

The intercept is 0.18. It is the height the line predicts at zero pumps. Zero pumps gives no launch, so the intercept is just where the line starts, not a real flight.

Always say the slope and intercept as a sentence with units. A number alone is not a conclusion.

RESIDUALS AND THE LINE
  • Read the question.
  • Tap your answer.
Launch 5: 6 pumps gave 7.5 m. The line predicts 7.7. What is the residual, to one decimal place?
Launch 6: 7 pumps gave 9.5 m. The line predicts 8.9. What is the residual, to one decimal place?
The fitted line is y = 1.25x + 0.18. What is its intercept?
What does the slope 1.25 mean in the pumps and height data?
FIND THE LEAST-SQUARES LINE
  • ?Pick a candidate line through the dots
  • ?Find each residual, actual minus predicted
  • ?Square every residual
  • ?Add the squares to get the total
  • ?Choose the line with the smallest total
WHY THIS EXERCISELeast squares is a rule for choosing one line fairly. Every graphing tool uses the same rule.
Launch 2: 3 pumps gave 3.5 m and the line predicts 3.9. What is the residual, to one decimal place?
Launch 7: 8 pumps gave 9.5 m and the line predicts 10.2. What is the residual, to one decimal place?
By the line, how many meters does the height rise for each extra pump? Type the slope.
StatementTrue or false?
A residual is actual minus predicted.?
A dot below the line has a positive residual.?
Squaring the residuals keeps big gaps from hiding behind small ones.?
The intercept of the pumps line is the height of a real zero-pump launch.?
A residual of zero means the dot sits exactly on the line.?
WHY THIS EXERCISESlope and intercept are only useful once you say what they mean for the rockets.
Try it
Lay your own line by eye on yesterday's plot. Measure its seven residuals with a ruler and square each one.
Add them up. Then move the line a little and try again. Did the total shrink or grow?
Draw the pumps plot with the fitted line and a short vertical stick from each dot to the line for its residual.

Excellent. Tomorrow the cart runs the ramp in the Loft Lab and the dots fall the other way.

← Monday