Seven scattered points appear alongside a movable line, with vertical residuals shown as squares whose areas sum in real time. As the line's slope and intercept are adjusted, the total squared area shrinks until it reaches a minimum, visually locating the least-squares solution. The formulas for slope and intercept then appear, connecting the geometric minimization to the algebraic result. Useful for students learning linear regression and why squared error, not just error, is minimized.
16:9 · every frame verified for overlaps, spacing and edges before rendering
Seven data points, a movable line, the residuals drawn as squares and their total updating live; the line settles where the sum of squares is smallest, and the slope and intercept formulas close.