Lab
Regression Playground
The least-squares line is the one line that makes the total of the squared residuals as small as possible. Add points, drag them, and turn on the squares to see what the line is minimizing.
Challenges
- Make a set of points with r close to 0.9. Now add one point that drops r below 0.5.
- Drag one point far above the line, near the middle of the x-values. Watch r and the residual plot. A point that does not fit the general pattern can change the picture a lot.
- Show the residual plot. Arrange points so the residual plot shows a curved pattern even though r is high.
- Choose My line and drag its two handles to beat least squares. You cannot. Why not?