Labs / Mathematics
Least Squares Fit
Every point casts a little square whose area is its squared distance from your line. Grab the two handles and tilt the line until the total shaded area is as small as it can be — that is exactly what “least squares” means. Add your own points by clicking, then hit snap to see the true best fit.
y = 0.30x + 5.00SSR 0r 0
What to try
- Can you get the total SSR lower by hand than the “Snap to best fit” button does?
- Turn on the best-fit ghost. Which way should you tilt the line to shrink the biggest square?
- Add one far-off point to the “Cloud” data. How much does a single outlier drag the best-fit line?
- What arrangement of points pushes r closest to +1 or −1, and what does that scatter look like?
- Can you place points so the correlation r is nearly 0 even though there is a clear pattern?