Regression by EyeStatLens

Generate a random dataset with a linear trend. Each click produces new data with a different slope, spread, and sample size.

Help

Drag the green line to fit the data as closely as you can. Use the controls to reveal residuals and compare your line to the mathematically optimal fit.

Grab the line
Grab near an end to pivot; grab near the middle to shift parallel
Show Residuals
Show vertical lines from each point to your line
Show Squared Residuals
Show literal squares whose area equals the squared error at each point
Absolute / Squared
Switch between Sum of Absolute Errors (SAE) and Sum of Squared Errors (SSE)
Show Best-Fit Line
Reveal the mathematically optimal line for the current metric

Keyboard Shortcuts

?
Show this help
/
Shift line up/down (parallel move)
/
Adjust slope (tilt left/right)
Shift+arrow
Move in larger steps
R
Try Again (reset your line)
N
Generate new random data
Esc
Close this dialog

New to this tool? Walk through it step by step.

Open guided walkthrough ↗