How to perform a Durbin-Watson Test in Excel?

The Durbin-Watson test is an inferential statistical test used to assess the presence of autocorrelation in the residuals of a regression analysis. To perform the test in Excel, the user must first have run a regression analysis and then use the DWSTAT function to calculate the Durbin-Watson statistic from the residuals of the regression. The DWSTAT function will then return a value between 0 and 4; values near 2 indicate a lack of autocorrelation, while values away from 2 indicate the presence of autocorrelation.


One of the is that there is no correlation between the residuals, e.g. the residuals are independent.

One way to determine if this assumption is met is to perform a , which is used to detect the presence of autocorrelation in the residuals of a regression. This test uses the following hypotheses:

H0 (null hypothesis): There is no correlation among the residuals.

HA (alternative hypothesis): The residuals are autocorrelated.

This tutorial provides a step-by-step example of how to perform a Durbin-Watson test in Excel.

Step 1: Enter the Data

First, we’ll enter the values for a dataset that we’d like to build a :

Step 2: Fit a Multiple Linear Regression Model

Next, we’ll fit a multiple linear regression model using y as the response variable and x1 and x2 as predictor variables.

To do so, click the Data tab along the top ribbon. Then click Data Analysis within the Analyze group.

If you don’t see this as an option, you need to first .

In the window that appears, click Regression and then click OK. In the new window that appears, fill in the following information:

Once you click OK, the regression output will appear:

Step 3: Perform the Durbin-Watson Test

The test statistic for the Durbin-Watson test, denoted d, is calculated as follows:

Durbin Watson test statistic

where:

  • T: The total number of observations
  • et: The tth residual from the regression model

To calculate this test statistic in Excel, we can use the following formula:

Durbin Watson test in Excel

The test statistic turns out to be 1.3475.

To determine if a Durbin-Watson test statistic is significantly significant at a certain alpha level, we can refer to of critical values.

For α = .05, n = 13 observations, and k = 2 independent variables in the regression model, the Durbin-Watson table shows the following upper and lower critical values:

  • Lower critical value: 0.86
  • Upper critical value: 1.56

Since our test statistic of 1.3475 does not lie outside of this range, we do not have sufficient evidence to reject the null hypothesis of the Durbin-Watson test.

In other words, there is no correlation among the residuals.

What to Do if Autocorrelation is Detected

If you reject the null hypothesis and conclude that autocorrelation is present in the , then you have a few different options to correct this problem if it’s serious enough:

  • For positive serial correlation, consider adding lags of the dependent and/or independent variable to the model.
  • For negative serial correlation, check to make sure that none of your variables are overdifferenced.
  • For seasonal correlation, consider adding seasonal to the model.

x