Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Drag the slope slider below. For each slope you choose, the intercept is set to the value that best fits that slope, so the vermillion line always pivots through the green centroid (xˉ,yˉ)(\bar{x}, \bar{y}). The green vertical segments are the residuals -- the gaps between each point and your line -- and the title reports the sum of squared errors SSE=(yiy^i)2\text{SSE} = \sum (y_i - \hat{y}_i)^2. As you drag, watch the SSE shrink to its smallest possible value exactly at the least-squares slope (the grey dotted target line), then grow again. That single lowest point is what “least squares” means.

Loading...