Two-Variable Data Models
A line of best fit summarizes the trend in scattered data. Adjust the slope and intercept below to try to minimize the total error — the dashed segments are the residuals you're trying to shrink.
A residual is the gap between an actual data point and what the line predicts for it: actual y minus predicted y. The line of best fit is the one line that makes the total of all those squared residuals as small as possible — which is exactly the number you were minimizing above.
Correlation describes how tightly points cluster around that line, on a scale from −1 to 1. The sign tells you the direction (positive slope vs. negative slope); the size tells you the strength — a coefficient near ±1 means a tight fit, near 0 means almost no linear relationship at all.
A model is only reliable within the range of x-values it was built from. Interpolating (predicting inside that range) is generally safe; extrapolating (predicting far outside it) assumes the same pattern keeps holding, which often isn’t true.