Regression & Predictive Modeling
Ordinary Least Squares (OLS)
Ordinary least squares is the standard recipe for finding the line of best fit. For every candidate line it measures each point's vertical miss (the residual), squares those misses, and adds them up; the winning line is the one that makes this total of squared misses as small as possible.
Squaring is the clever part: it makes every error positive so they cannot cancel out, and it punishes a few big misses far more than many tiny ones, pulling the line toward the bulk of the data. OLS has a tidy exact formula and is the default behind almost every introductory regression, but because it squares errors it is sensitive to outliers, where a single extreme point can yank the line noticeably.
Also called