Interactive Least Squares Visualization
Interactive Least Squares Learning Tool
Adjust the red line using the sliders below to try to minimize the sum of squared errors. The blue squares show the squared residuals!
Intercept \(\hat\beta_0\)
Slope \(\hat\beta_1\)
Your Line
y = 1.50 + 1.00x
Optimal Least Squares
y = 1.50 + 1.00x
Your SSE
0.00
Optimal SSE
0.00
Key Concepts
Goal: Find the line \(\hat{y} = \hat\beta_0 + \hat\beta_1x\) that minimizes the Sum of Squared Errors (SSE)
The blue squares show the squared residuals - their total area equals the SSE!
What to Try:
- Adjust the sliders to minimize the total area of blue squares
- Try to match the optimal (green) line
- Notice how the squares get smaller as you approach the optimal solution