Independence of residuals means that regression errors are not correlated with one another. Correlated residuals can indicate that the model missed a systematic pattern. section 4.2.4
Assess the assumption with the Durbin–Watson test:
- Compute a statistic from squared differences between successive residuals divided by the total squared residuals. section 4.2.4
- Interpret values from 1.5 to 2.5 as generally consistent with failing to reject no correlation. section 4.2.4
- Treat values nearer 0 or 4 as stronger evidence of positive or negative residual correlation. section 4.2.4
Testing residual independence in Python
Use statsmodels: `from statsmodels.stats.stattools import durbin_watson`; then evaluate `durbin_watson(lm.resid)`. A result of 2.3264601831112186 falls within the usual 1.5–2.5 range, supporting the assumption of independent residuals. section 4.2.4
