Discover
A line fits some points, but none lies exactly on it. Which line is 'best'?
- The one that makes the sum of the squared vertical misses as small as possible
- Any line through two of the points
Key idea
Least squares.
The least-squares line makes as small as possible. It always passes through the mean point .
Worked example
Data: , , . The least-squares slope is 2.5. Find .
Your turn, guided
Your turn: the line has slope 3 and , . Find .
Practice ★
- A least-squares line has slope 7 and the mean point is . Find its intercept .
- A least-squares line has slope 8 and the mean point is . Find its intercept .
- A least-squares line has slope 8 and the mean point is . Find its intercept .
Practice ★★
- Three points have residuals , and for the line . Find the sum of the squared residuals.
- Three points have residuals , and for the line . Find the sum of the squared residuals.
Exit ticket
Two questions to check.
- A least-squares line has slope 7 and the mean point is . Find its intercept .
- A least-squares line has slope 8 and the mean point is . Find its intercept .
Summary card
Least squares
- Minimize the sum of squared residuals.
- The line passes through .
Every spreadsheet's 'trend line' is a least-squares line.