← All topics

The Sum of Squared Residuals as a Surface

For simple linear regression, the sum of squared residuals (SSR) is a function of the two coefficients β₀ and β₁ — not just a single number. Use the sliders to choose a value of (β₀, β₁); the fitted line updates in the left panel, and a red dot marks where that choice sits on the SSR surface (right, rotatable) and on the same surface viewed from above as a contour map (far right). The blue ring marks the least-squares optimum — the bottom of the bowl.

Keyboard and screen reader users: the β₀ and β₁ sliders are the primary controls — both are standard sliders operable with the arrow keys once focused. The 3D surface panel can also be rotated by dragging with a mouse, but this is a supplementary view; all information is available through the sliders and the stats line below the panels.

Data and the line for the current (β₀, β₁)

SSR(β₀, β₁) surface — drag to rotate

SSR(β₀, β₁) contour map (top-down view of the same surface)

β₀ = β₁ = SSR = optimum: β₀ = β₁ = min SSR =