Durbin-Watson Statistic Calculator Formula

Understand the math behind the durbin-watson statistic calculator. Each variable explained with a worked example.

Formulas Used

Durbin-Watson Statistic

dw = sum_diff_sq / sum_e_sq

Approx Autocorrelation

approx_rho = 1 - (sum_diff_sq / sum_e_sq) / 2

Variables

VariableDescriptionDefault
sum_diff_sqSum of (et - et-1) squared45
sum_e_sqSum of et squared50

How It Works

Durbin-Watson Test

DW = Sum(et - et-1)^2 / Sum(et^2)

DW near 2 = no autocorrelation. DW < 2 = positive, DW > 2 = negative.

Worked Example

Sum diff sq=45, sum e sq=50.

sum_diff_sq = 45sum_e_sq = 50
  1. 01DW = 0.90
  2. 02Positive autocorrelation