In statistics, a residual measures the vertical distance between an observed data point and the value predicted by a regression model. Understanding how to find and interpret residuals is fundamental for assessing model fit, detecting patterns that violate assumptions, and improving predictive accuracy. Each residual represents the error term for a single observation, calculated as the difference between the actual value and the fitted value. In the context of linear regression, residuals reveal whether the chosen model adequately captures the relationship between the independent and dependent variables, or whether a more complex approach is warranted.
The basic formula for a residual is straightforward:
$e_i = y_i - \hat{y}_i$
where $e_i$ is the residual