Calculator Inputs
Example Data Table
Use this small sample when learning the workflow.
| t | Observed (y) | Predicted (ŷ) | Residual (e = y − ŷ) |
|---|---|---|---|
| 1 | 10 | 9.7 | 0.3 |
| 2 | 11.5 | 11.2 | 0.3 |
| 3 | 12.1 | 12 | 0.1 |
| 4 | 13 | 13.3 | -0.3 |
| 5 | 12.6 | 12.4 | 0.2 |
| 6 | 12.9 | 13.1 | -0.2 |
Formula Used
The Durbin–Watson statistic measures first-order autocorrelation in regression residuals:
- DW ≈ 2 suggests no autocorrelation.
- DW < 2 suggests positive autocorrelation.
- DW > 2 suggests negative autocorrelation.
- DW is bounded between 0 and 4.
How to Use This Calculator
- Select an input mode: residuals directly, or observed & predicted.
- Paste values in the provided boxes, keeping time order.
- Click Calculate to show results above the form.
- Review the computation table to verify the sums.
- Use Download CSV or Download PDF for reporting.
Residual ordering and time index discipline
Durbin–Watson depends on the sequence of residuals, not only their size. Use the original time index, and never sort by value. If your data are monthly sales, residual t=1 must be the first month. A single misplaced point can shift the numerator and change DW noticeably, especially when residuals alternate signs.
Numerator behavior and smoothness signal
The numerator sums squared step changes between consecutive residuals. When residuals drift slowly, successive differences stay small and DW moves below 2. When residuals zigzag rapidly, differences grow and DW moves above 2. In quality monitoring, a smooth residual path can indicate persistent effects that a model missed.
Denominator scaling and variance context
The denominator is the residual energy, Σe_t². For the same pattern of changes, larger residual variance increases the denominator and can pull DW closer to zero change. This is why DW should be read alongside residual scale metrics such as RMSE. A tiny DW shift may be immaterial if residual variance is unstable.
Practical bands for screening workflows
For quick screening, many teams use informal bands: 1.8–2.2 as acceptable, 1.5–1.8 as mild positive autocorrelation risk, and below 1.5 as strong concern. On the negative side, 2.2–2.5 is mild, and above 2.5 is strong. Confirm with domain-specific diagnostics before decisions.
Data length effects and sensitivity
With small n, one unusual point can dominate both sums. As n grows, DW stabilizes, but it can still react to regime changes, holidays, or sensor drift. If you suspect structural breaks, compute DW on rolling windows, such as 30 or 60 periods, and compare segments rather than relying on one global statistic.
Reporting outputs for audits and reviews
The CSV export here lists e_t, lagged e_{t−1}, differences, and squared terms, matching the formula. The PDF summary captures n, numerator, denominator, and DW for traceability. In peer review, include the residual plot, the chosen input mode, and the data source description to make replication straightforward. clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly clearly
FAQs
1) What does a DW value near 2 mean?
A value near 2 suggests little to no first-order autocorrelation in the residuals, which supports the independence assumption used in many regression and forecasting checks.
2) Can DW be used with non-time data?
It can, but only if your observations have a meaningful order, such as spatial sequence or production batches. Without a defensible order, DW has no clear interpretation.
3) Why can DW move when I rescale my data?
If residuals are scaled uniformly, DW usually stays similar. It changes when rescaling alters the model fit, the residual pattern, or the ordering and spacing of observations.
4) Is DW a hypothesis test in this calculator?
No. This calculator provides the statistic and practical interpretation bands. Formal testing requires critical values or alternative methods that depend on sample size and predictors.
5) Should I compute DW on raw errors or standardized residuals?
Either works if the order is preserved. Standardized residuals can help compare across models, but DW mainly reflects the shape of changes between consecutive residuals.
6) What should I do if DW indicates autocorrelation?
Check residual plots, add lag features, consider ARIMA/GLS approaches, or model seasonality and regime shifts. Recompute DW on updated residuals to confirm improvement.