Durbin-Watson Statistic Calculator

Regression diagnostics

Durbin-Watson statistic0.876
Sum of squared residuals4.84
Sum of squared differences4.24
Implied lag-1 autocorrelation0.562
How this was calculated
  1. Sum of squared residuals: 4.84 over the 8 residuals.
  2. Sum of squared successive differences: 4.24.
  3. Durbin-Watson statistic: 4.24 / 4.84 = 0.876.
  4. The implied lag-1 autocorrelation is 1 - DW / 2 = 0.562; a Durbin-Watson near 2 means no autocorrelation.

Regression residuals should be strangers to one another. When they are not - when a positive residual tends to follow a positive one - standard errors shrink on paper while true uncertainty does not, and every t-statistic in the model is flattered. The Durbin-Watson statistic is the classic tripwire: near 2, residuals look independent; toward 0, positive autocorrelation; toward 4, negative. This page computes it directly from a series of residuals.

Enter eight residuals in time order. The calculator returns the Durbin-Watson statistic, the sum of squared residuals, the sum of squared successive differences, and the implied lag-1 autocorrelation r1 = 1 - DW/2.

Worked examples

Wandering residuals, DW 0.876

(1.2 · 0.8 · -0.5 · -1.1 · -0.3 · 0.6 · 0.9 · 0.2)

Durbin-Watson statistic0.876
Sum of squared residuals4.84
Sum of squared differences4.24
Implied lag-1 autocorrelation0.562

Alternating residuals, DW 3.763

(0.5 · -0.7 · 0.9 · -1 · 0.8 · -0.6 · 0.4 · -0.3)

Durbin-Watson statistic3.763
Sum of squared residuals3.80
Sum of squared differences14.30
Implied lag-1 autocorrelation-0.882

Drifting residuals, DW 0.152

(1.5 · 1.3 · 0.9 · 0.4 · -0.2 · -0.8 · -1.2 · -1.4)

Durbin-Watson statistic0.152
Sum of squared residuals8.99
Sum of squared differences1.37
Implied lag-1 autocorrelation0.924

Two sums of squares, one ratio

DW = sum((e_t - e_{t-1}) squared) / sum(e_t squared). Independent residuals make successive differences large relative to the residuals themselves - the numerator runs about twice the denominator and DW lands near 2. Positively autocorrelated residuals drift smoothly, successive differences shrink, and DW sinks toward 0. Alternating residuals inflate the differences and push DW toward 4.

The first example's residuals - 1.2, 0.8, -0.5, -1.1, -0.3, 0.6, 0.9, 0.2 - wander down then up, so neighbours resemble each other: sum of squared residuals 4.84, sum of squared differences only 4.24, DW = 0.876. The implied lag-1 autocorrelation is 0.562.

The approximation DW approximately 2(1 - r1), rearranged as r1 = 1 - DW/2, is the statistic's pocket form - the bridge between the DW literature and the autocorrelation literature, printed with every result here.

  • DW = sum of squared successive differences / sum of squared residuals
  • DW near 2: independence; near 0: positive; near 4: negative autocorrelation
  • Implied r1 = 1 - DW/2
  • This page takes eight residuals in time order

Worked examples: three residual series

The wandering series above: DW 0.876, r1 0.562 - clear positive autocorrelation. Residuals that trend down then up are the visual signature; the statistic prices it.

The alternating series: 0.5, -0.7, 0.9, -1.0, 0.8, -0.6, 0.4, -0.3. Every step reverses sign, so the differences are huge - sum of squared differences 14.30 against squared residuals of 3.80 - and DW = 3.763, with implied r1 of -0.882. This is the fingerprint of an overdifferenced series or an oscillating misspecification.

The drifting series: 1.5, 1.3, 0.9, 0.4, -0.2, -0.8, -1.2, -1.4 - a near-monotone slide. Successive differences are tiny (sum 1.37) against squared residuals of 8.99, and DW = 0.152, near the floor, with r1 = 0.924. A DW this low usually means a missing trend or a structural break wearing autocorrelation's clothes.

Judging the number: bounds and the grey zone

DW's exact distribution depends on the regressor matrix, so Durbin and Watson tabulated bounds, dL and dU, indexed by sample size and the number of regressors: below dL, reject independence; above dU, do not; between them lies the test's famous inconclusive region. Modern software computes exact p-values for a given design; the bounds remain the quick screen and the form in which the test is taught.

The three examples sit far from any grey zone - 0.876 and 0.152 are below any plausible lower bound for their designs, and 3.763 is damning on the negative side (judged by comparing 4 - DW = 0.237 against the same bounds). Verdicts this clear are why the statistic survives as a first diagnostic.

Treat a genuinely inconclusive result as a result, not a failure: it localises the evidence honestly, and the follow-up it calls for - the Breusch-Godfrey test, which handles higher-order autocorrelation and lagged dependent variables - is the right tool for the cases DW cannot decide.

Verdict discipline: far below the lower bound is evidence, far above the upper bound is clearance, between them is 'inconclusive' - report it as such and escalate to Breusch-Godfrey.

Limits of the test

DW interrogates only first-order autocorrelation, and only in models without a lagged dependent variable - with one, the statistic is biased toward 2 and Durbin's h or Breusch-Godfrey takes over. It also presumes the residuals come in a meaningful time order; applied to shuffled or cross-sectional data it manufactures a meaningless number near 2.

Autocorrelation itself is usually a symptom: omitted variables, wrong functional form, or dynamics the static model cannot express. The drifting example's 0.152 is a specification alarm before it is a standard-error problem. Correcting the standard errors (Newey-West) treats the symptom honestly for inference; respecifying the model treats the cause.

Eight residuals, as on this page, illustrate the statistic rather than power a study - real applications run DW on the full residual series, where the same two sums of squares scale up unchanged.

What to do with a low DW

The response menu, in order of preference: respecify (add the missing trend, lag or regressor the residuals are pointing at), model the dynamics explicitly (an AR error structure or a lagged outcome, with the appropriate test replacing DW), or - if the specification is trusted and only inference is at stake - use autocorrelation-robust standard errors and say so.

The drifting example's r1 of 0.924 is beyond cosmetic fixes: a correlation that strong rewrites the effective sample size (roughly n(1-r)/(1+r) under AR(1) - here a small fraction of the nominal n), so every significance claim in the original fit is suspect until the dynamics are modelled.

Differencing is the blunt instrument on the menu: it cures strong positive autocorrelation by construction and manufactures negative autocorrelation if overused - the alternating example's DW of 3.763 is what that looks like from the other side. The test on this page grades whichever remedy is chosen, by the same two sums of squares.

Reading DW in a workflow

The practical sequence: fit, plot the residuals in time order (the eye catches what any single statistic misses - the three example series are chosen to be visible), compute DW here, and act on the verdict. Wandering, alternating, drifting: 0.876, 3.763, 0.152 are the three mornings a time-series analyst actually has.

Report DW with its sample size and regressor count, since the bounds that judge it depend on both: 'DW = 0.876 on 8 residuals, implied r1 0.562' is a finding a reader can weigh; a bare 'DW = 0.876' is a number.

And keep the pocket form in mind when reading other work: a reported DW of 0.152 is a reported lag-1 autocorrelation of about 0.924, whether or not the author chose to say so. The statistic's survival since 1950 is explained by that transparency: two sums of squares, one ratio, no black box.

Worked check: the sums by hand

The first example audits on an envelope: the residuals 1.2, 0.8, -0.5, -1.1, -0.3, 0.6, 0.9, 0.2 square and sum to 4.84; the successive differences (-0.4, -1.3, -0.6, 0.8, 0.9, 0.3, -0.7) square and sum to 4.24; the ratio is 0.876. Any implementation failing to reproduce these three numbers on this series has a bug, whatever its interface claims.

The pocket formula cross-checks the interpretation: 1 - 0.876/2 = 0.562, matching the printed implied autocorrelation. A reported DW and a reported lag-1 residual autocorrelation that violate this relation were computed on different residuals - a common accident when a model is refit between diagnostics.

These checks cost nothing and catch the stale-residual error that survives every software upgrade.

DW in published work

Econometrics papers report DW almost ritually in time-series regressions, and the ritual has value: a table whose DW column reads 0.876, 3.763, 0.152 across specifications is telling the specification story before the text does. Inconclusive results are underpublished everywhere, and regression diagnostics are no exception - the grey zone occurs more often than it is confessed.

Readers can protect themselves with the pocket formula: any DW converts to an approximate residual autocorrelation in one subtraction, and a DW of 0.152 in a published table is a claim of r1 about 0.924 whether the authors discuss it or not.

Run it on every time-series fit, before the coefficients are discussed: it is two sums of squares, and it has ended more overconfident presentations than any other single number in regression.

A note on sample size: with only eight residuals, as in these teaching examples, the bounds tables are wide and the inconclusive region swallows most of the plausible range - which is precisely why the examples were chosen at the extremes (0.152, 0.876, 3.763), where even a small-sample verdict is clear. In production work the statistic is computed on the full residual run of the fitted model, dozens to thousands of points, where the bounds tighten and middling values like 1.7 or 2.3 acquire definite verdicts.

Keep the three series as a pocket reference: wandering neighbours give 0.876, a steady drift gives 0.152, and sign-alternating residuals give 3.763 - the three shapes worth recognising on sight in any residual plot, before any table of bounds is opened.

FAQs

What is the DW of the first residual series?

0.876.

What is its implied lag-1 autocorrelation?

0.562.

What do alternating residuals give?

DW 3.763, autocorrelation -0.882.

And a drifting series?

DW 0.152.

What is the sum of squared residuals in the first example?

4.84.

What DW signals clean residuals?

Near 2 - none of the three examples, by design.

Sources

Related calculators

Linear Regression Calculator
The least-squares line through up to six points — slope, intercept, correlation r and R², with the equation ready to use.
R-Squared Calculator
Coefficient of determination from summary sums — r, R² and adjusted R² without entering raw data.
Correlation Coefficient Calculator
Pearson's r for up to six paired observations, with r² and the deviation sums shown — the full workings, not just the headline number.