Home » All Calculators » Mathematics and Statistics » Durbin Watson Statistic Calculator

Durbin Watson Statistic Calculator

Photo of author
Published on

The Durbin Watson statistic is a useful tool in statistics that helps us check if there is a relationship between values in a data set that are separated by a certain time period. This is called autocorrelation. When we perform a regression analysis, we assume that the residuals (the differences between the observed values and the values predicted by the model) are independent. If there is autocorrelation, it means this assumption is violated, which can affect the results of our analysis.

A Durbin Watson statistic calculator helps us determine if autocorrelation is present in the residuals of our regression model.

Purpose and Functionality

The purpose of the Durbin Watson statistic is to detect autocorrelation in the residuals from a regression analysis. Autocorrelation can make our results unreliable, so it’s important to check for it. The Durbin Watson statistic ranges from 0 to 4.

  • A value close to 2 suggests there is no autocorrelation.
  • A value close to 0 indicates positive autocorrelation.
  • A value close to 4 indicates negative autocorrelation.

Formula for the Durbin Watson Statistic

The formula to calculate the Durbin Watson statistic (d) is:

d=∑i=2n(ei−ei−1)2∑i=1nei2d = \frac{\sum_{i=2}^{n} (e_i – e_{i-1})^2}{\sum_{i=1}^{n} e_i^2}d=∑i=1n​ei2​∑i=2n​(ei​−ei−1​)2​

where:

  • eie_iei​ represents the residuals at the iii-th observation.
  • nnn is the number of observations.

Steps to Calculate the Durbin Watson Statistic

  1. Calculate the residuals: Run your regression model to get the residuals, which are the differences between the actual values and the predicted values.
  2. Compute the difference between consecutive residuals: For each pair of consecutive observations, calculate the difference between their residuals.
  3. Square the differences: Square each of the differences calculated in the previous step.
  4. Sum the squared differences: Add up all the squared differences.
  5. Sum the squared residuals: Square each residual and then sum these squares.
  6. Apply the formula: Use the sums from steps 4 and 5 in the formula to compute the Durbin Watson statistic.

Example Calculation

Suppose we have a dataset with the following residuals from a regression model:

  • e1=2e_1 = 2e1​=2
  • e2=1e_2 = 1e2​=1
  • e3=3e_3 = 3e3​=3
  • e4=5e_4 = 5e4​=5

First, calculate the differences between consecutive residuals:

  • e2−e1=1−2=−1e_2 – e_1 = 1 – 2 = -1e2​−e1​=1−2=−1
  • e3−e2=3−1=2e_3 – e_2 = 3 – 1 = 2e3​−e2​=3−1=2
  • e4−e3=5−3=2e_4 – e_3 = 5 – 3 = 2e4​−e3​=5−3=2

Then, square these differences:

  • (−1)2=1(-1)^2 = 1(−1)2=1
  • 22=42^2 = 422=4
  • 22=42^2 = 422=4

Sum the squared differences:

  • 1+4+4=91 + 4 + 4 = 91+4+4=9

Next, sum the squares of all residuals:

  • 22+12+32+52=4+1+9+25=392^2 + 1^2 + 3^2 + 5^2 = 4 + 1 + 9 + 25 = 3922+12+32+52=4+1+9+25=39

Finally, apply the formula:

d=939≈0.231d = \frac{9}{39} \approx 0.231d=399​≈0.231

This value of ddd can be compared to critical values from a Durbin Watson table to determine if there is autocorrelation present.

Relevant Information Table

StepCalculationResult
Residualse1=2,e2=1,e3=3,e4=5e_1 = 2, e_2 = 1, e_3 = 3, e_4 = 5e1​=2,e2​=1,e3​=3,e4​=5
Differences−1,2,2-1, 2, 2−1,2,2
Squared Differences1,4,41, 4, 41,4,4999
Squared Residuals4,1,9,254, 1, 9, 254,1,9,25393939
Durbin Watson Statistic939≈0.231\frac{9}{39} \approx 0.231399​≈0.2310.231

Conclusion

The Durbin Watson statistic is a valuable tool in regression analysis to check for autocorrelation in residuals. It helps ensure the validity of our regression results by confirming that the residuals are independent. Using the steps and formula outlined above, we can easily calculate the Durbin Watson statistic and interpret its value to assess the presence of autocorrelation.

Leave a Comment