Skip to content
Least squares — minimising SSR

OLS picks the line that minimises the sum of squared residuals, SSR = Σ(yᵢ − ŷᵢ)². Residuals are the vertical gaps from each point to the line. Drag your blue line and try to beat the gold OLS line on SSR.

SSR — your line vs OLS26 vs 26
161116221357911xyOLS best-fit lineYour line
OLS line ŷ = 2.1 + 1.55xSSR (OLS, min) 26R² (OLS) 93%
Your intercept b₀2.1
Your slope b₁1.55
Your line sits exactly on the OLS line, so the two SSRs are equal at the minimum 26. Nudge a slider and the loss can only go up.
The Simple Linear Regression ModelOpen in Dr Phil's Quant Lab ↗