Skip to content
Omnikalc

Durbin-Watson calculator

Enter the number of observations, the sum of squared residuals and the sum of squared successive differences to get the Durbin-Watson statistic and the estimated autocorrelation.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Results

Durbin-Watson statistic d

1.876

No sign of first-order autocorrelation
Estimated autocorrelation of the residuals
0.062
Large-sample z statistic
0.48
Two-sided p-value (large-sample test)
0.6297

The Durbin-Watson calculator gives the Durbin-Watson statistic, the estimated autocorrelation and an approximate p-value from the sums that your regression software reports for the residuals.

How the calculation works

  • Enter the number of observations.
  • Enter the sum of squared residuals and the sum of squared differences of successive residuals.
  • The calculator gives d, the autocorrelation, the z statistic and the p-value.

Example

With 60 observations, a sum of squared residuals of 48.2 and a sum of squared successive differences of 90.4, d = 90.4 / 48.2 = 1.876. The autocorrelation is 1 − d / 2 = 0.062, the z statistic is 0.48 and the two-sided p-value is 0.6297, so the residuals are not significantly correlated at the 5 % level.

Why it matters

The calculator helps students, analysts and economists to check the independence of the errors of a regression on time ordered data, such as sales by month or prices by year.

Good to know

The residuals must be in time order, because the statistic compares each residual with the previous one. The p-value given here is the large-sample normal approximation, and for small samples or for borderline cases you should check the Durbin-Watson tables, with the lower bound dL and the upper bound dU: below dL there is evidence of positive autocorrelation, above dU there is none, and between the two the test is inconclusive. The test does not apply when the model includes the lagged dependent variable, where the Durbin h test is used. Plot the residuals over time as well, since a pattern is often clear to the eye.

The linear regression calculator fits a line, the regression prediction interval calculator gives the uncertainty of a forecast, the correlation significance calculator tests a correlation and the normal distribution calculator gives probabilities.

Frequently asked questions

What does the Durbin-Watson statistic measure?

It checks whether the residuals of a regression are correlated with the previous ones. The statistic is d = Σ (e(t) − e(t−1))² / Σ e(t)², and it ranges from 0 to 4. A value near 2 means no first-order autocorrelation, a value near 0 means strong positive autocorrelation and a value near 4 strong negative autocorrelation.

How is d related to the autocorrelation?

For a large sample, d is about 2 (1 − ρ), where ρ is the first-order autocorrelation of the residuals. The calculator inverts this to give ρ and uses ρ √n as an approximate standard normal statistic. The exact test uses the bounds dL and dU from the Durbin-Watson tables, which depend on n and on the number of predictors.

Why does autocorrelation matter?

Positive autocorrelation makes the standard errors of the coefficients too small, so that the tests look more significant than they are. It is common in time series data. Fixes include adding a lagged variable, using Newey-West standard errors or fitting a model with an autoregressive error term.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.