Mathwords logoMathwords

Durbin-Watson Statistic — Definition, Formula & Example

The Durbin-Watson statistic is a number between 0 and 4 that tells you whether the residuals from a regression are correlated with the residuals right before them in time. A value near 2 suggests no such pattern. Values well below 2 suggest positive autocorrelation, and values well above 2 suggest negative autocorrelation.

For ordinary least squares residuals e1,e2,…,ene_1, e_2, \dots, e_n listed in time order, the Durbin-Watson statistic dd is the sum of squared successive differences divided by the residual sum of squares. It tests H0H_0: no first-order (lag-1) autocorrelation in the errors. The relation d≈2(1−ρ^)d \approx 2(1 - \hat{\rho}) holds, where ρ^\hat{\rho} is the lag-1 sample autocorrelation of the residuals. You compare dd with tabulated lower and upper bounds dLd_L and dUd_U. If d<dLd < d_L, reject H0H_0 in favor of positive autocorrelation. If d>dUd > d_U, do not reject. If dL≤d≤dUd_L \le d \le d_U, the test is inconclusive. To test for negative autocorrelation, apply the same bounds to 4−d4 - d.

Key Formula

d=∑t=2n(et−et−1)2∑t=1net2d = \frac{\sum_{t=2}^{n} (e_t - e_{t-1})^2}{\sum_{t=1}^{n} e_t^2}
Where:
  • dd = Durbin-Watson statistic, always between 0 and 4
  • ete_t = Residual (observed minus predicted value) at time period t
  • nn = Number of observations, in time order

Worked Example

Problem: A regression predicts a food truck's weekly revenue from the average daily high temperature in degrees Fahrenheit. The residuals for 5 consecutive weeks, in hundreds of dollars, are 2, 1, 0, −1, −2. Compute the Durbin-Watson statistic and interpret it.
Step 1: Find the numerator. Subtract each residual from the next one, square each difference, and add the results.
(1−2)2+(0−1)2+(−1−0)2+(−2−(−1))2=1+1+1+1=4(1-2)^2 + (0-1)^2 + (-1-0)^2 + (-2-(-1))^2 = 1+1+1+1 = 4
Step 2: Find the denominator. Square every residual and add the squares.
22+12+02+(−1)2+(−2)2=4+1+0+1+4=102^2 + 1^2 + 0^2 + (-1)^2 + (-2)^2 = 4+1+0+1+4 = 10
Step 3: Divide the numerator by the denominator.
d=410=0.4d = \frac{4}{10} = 0.4
Answer: The statistic is d=0.4d = 0.4. This is far below 2, which points to positive autocorrelation: each week's error closely resembles the previous week's. The rule of thumb d≈2(1−ρ^)d \approx 2(1-\hat{\rho}) works well only for large nn: here the actual lag-1 autocorrelation is r1=2⋅1+1⋅0+0⋅(−1)+(−1)(−2)10=0.4r_1 = \frac{2\cdot 1 + 1\cdot 0 + 0\cdot(-1) + (-1)(-2)}{10} = 0.4. Five points are too few for a formal table test, so treat this result as an illustration. With real data you would compare dd with dLd_L and dUd_U for your nn and number of predictors.

Why It Matters

Ordinary least squares assumes the errors are independent. When time-series residuals are autocorrelated, the reported standard errors are usually too small. As a result, p-values look more significant than they really are. Econometrics courses and forecasting work, such as modeling sales or stock prices, use the Durbin-Watson test as a routine check before anyone trusts those p-values.

Common Mistakes

Mistake: Reading a value of d near 0 as 'no autocorrelation,' as if d worked like a correlation coefficient.
Correction: The neutral value is 2, not 0. A value of d near 0 signals strong positive autocorrelation, and a value near 4 signals strong negative autocorrelation. Use ρ^≈1−d/2\hat{\rho} \approx 1 - d/2 to translate d into a correlation-like number.

Related Terms