Table of Contents
A cornerstone assumption of valid regression analysis is the statistical independence of error terms, often referred to as residuals. This assumption strictly implies that the error observed at one point in time or sequence should not be correlated with the error observed at any other point. When this condition is violated—a common occurrence in models involving time series data—our standard error calculations become unreliable, potentially leading to inaccurate statistical inferences about the model’s coefficients.
To systematically test for this critical violation, statisticians rely on the Durbin-Watson test. This powerful statistical procedure is explicitly designed to detect the presence of first-order autocorrelation (or serial correlation) in the residuals generated by ordinary least squares (OLS) regression models. Identifying autocorrelation is essential because its presence compromises the efficiency of the OLS estimators, thereby violating the fundamental Gauss-Markov theorem.
The Durbin-Watson test formally assesses the independence of errors using a pair of competing hypotheses that structure the statistical decision-making process:
H0 (Null Hypothesis): There is no first-order autocorrelation among the residuals. The error terms are independent.
HA (Alternative Hypothesis): The residuals exhibit first-order autocorrelation, meaning the current error term is dependent on the error term from the previous period.
This comprehensive guide provides a precise, step-by-step methodology for executing and interpreting the Durbin-Watson test statistic using Microsoft Excel, a highly accessible tool for preliminary statistical modeling and data analysis.
Step 1: Organizing and Preparing the Data Set in Excel
The initial phase of any robust statistical investigation is the meticulous organization of the underlying data. Before we can generate the necessary components for the Durbin-Watson calculation, we must first structure our data set correctly within the spreadsheet environment. This critical step involves entering the observations for the response variable (Y) and all associated predictor variables (X) into adjacent, clearly labeled columns.
For the purposes of this tutorial, we will utilize a sample data set to construct a multiple linear regression model. It is crucial to label your columns clearly—for instance, designating one column as the response variable ‘y’ and subsequent columns as the predictor variables, such as ‘x1’ and ‘x2’. Proper data preparation in this manner streamlines the process of defining input ranges when executing the regression function in Excel’s analysis tools.

Step 2: Generating Residuals via the Regression Tool
The Durbin-Watson statistic is fundamentally built upon the sequence of error terms derived from the fitted regression model. Therefore, the next critical action is to fit the OLS regression model itself to the prepared data set. In our illustrative example, the variable ‘y’ serves as the response variable, modeled using ‘x1’ and ‘x2’ as the two primary predictor variables.
To access the regression capabilities in Excel, navigate to the Data tab in the main ribbon. Within the Analyze group, usually located on the far right, click on Data Analysis. If this option is not immediately visible, you must first load the Analysis ToolPak add-in, as this extension provides the necessary statistical computation capabilities required for running regressions.

In the Data Analysis dialog box that appears, select the Regression option and click OK. In the ensuing setup box, accurately define the Input Y Range (the dependent variable) and the Input X Range (the independent variables). Crucially, to ensure the necessary components are calculated, navigate to the Output Options section and check the box labeled Residuals. This action tells Excel to output the list of numerical residuals required for the subsequent calculation step.

After clicking OK, Excel will generate a new sheet containing the comprehensive regression output, which includes the summary statistics, coefficient estimates, and, most importantly for our purposes, a dedicated table listing the calculated residuals for every observation point in the data set.

Step 3: Calculating the Durbin-Watson (d) Test Statistic
The Durbin-Watson statistic, denoted by the symbol d, provides a precise measure of the relationship between successive error terms. The formal mathematical definition of this statistic is given by the ratio of the sum of the squared differences between consecutive residuals to the total sum of the squared residuals:

The variables used in this calculation are defined as follows:
- T: Represents the Total number of observations utilized in the fitted regression model.
- et: Denotes the tth residual corresponding to the current observation in the time series or sequence.
- et-1: Represents the residual from the immediately preceding observation (t-1), highlighting the sequential dependence.
To compute d efficiently in Excel, we must utilize the generated residual column. We calculate the squared difference between each residual and its preceding residual, sum these differences (the numerator), and then divide this total by the sum of all squared residuals (the denominator). The required spreadsheet setup, including these intermediate calculations, is illustrated below:

Following the application of the formula to the summed columns, the Durbin-Watson test statistic for this specific data set is determined to be 1.3475. This calculated value is now ready for comparison against the critical bounds to draw a statistical conclusion.
Step 4: Interpreting the Durbin-Watson Critical Values
Interpreting the Durbin-Watson statistic differs from standard hypothesis tests because it requires consulting specialized statistical tables rather than relying on a simple p-value. The Durbin-Watson table provides two critical thresholds: a lower critical value (dL) and an upper critical value (dU). These values define three distinct zones—rejection, non-rejection, and inconclusive—and are determined by the significance level (α), the total number of observations (n), and the number of independent variables (k).
For our continuing analysis, we assume standard parameters: a significance level of α = 0.05, a total of n = 13 observations, and k = 2 independent variables (x1 and x2). Consulting the appropriate Durbin-Watson table yields the following critical bounds for this specific model configuration:
- Lower critical value (dL): 0.86
- Upper critical value (dU): 1.56
The statistical decision rule is based on where the calculated test statistic (d) falls relative to these critical bounds:
- If d < dL, we reject H0 and conclude there is strong evidence of positive autocorrelation.
- If d > dU, we fail to reject H0, suggesting no significant autocorrelation is present.
- If d falls between dL and dU, the test is inconclusive, meaning we cannot definitively state whether autocorrelation exists.
Since our calculated test statistic of 1.3475 falls directly within the inconclusive range (0.86 < 1.3475 < 1.56), we conclude that we do not have sufficient statistical evidence to reject the null hypothesis of the Durbin-Watson test at the 5% significance level. We cannot conclusively determine if autocorrelation is present in this data set.
Step 5: Addressing Autocorrelation When Detected
If the Durbin-Watson test yields a result that leads to the rejection of the null hypothesis—thereby confirming the presence of significant autocorrelation in the residuals—it indicates a severe violation of OLS assumptions. This violation results in inefficient coefficient estimates and biased standard errors, making hypothesis testing unreliable. Corrective actions must be taken, and the choice of action depends heavily on the specific nature of the serial correlation observed:
- For Positive Serial Correlation: This is the most frequently encountered issue. Effective solutions include modifying the model structure by incorporating lagged values of the dependent variable (Y) and/or independent variables (X) as new predictors. Alternatively, specialized estimation techniques, such as the Prais-Winsten or Cochrane-Orcutt procedures, can be used to transform the data, though these usually require dedicated statistical software packages.
- For Negative Serial Correlation: Negative autocorrelation is generally less common. When observed, it may sometimes be an unintended consequence of over-differencing the time series data. If the series has been subjected to differencing more times than required to achieve stationarity, spurious negative correlation can be introduced. Analysts should carefully review their data transformation steps.
- For Seasonal Correlation: In data exhibiting clear seasonal patterns (e.g., quarterly or monthly financial data), the correlation might occur at fixed intervals rather than sequentially. In these cases, adding specific seasonal dummy variables to the regression model is advisable to capture and control for cyclical effects that are not explained by the primary explanatory variables.
Additional Resources for Advanced Econometrics
While Excel serves as an excellent platform for calculating the Durbin-Watson statistic, more complex applications in econometrics often necessitate dedicated software. Such tools are required for implementing advanced correction methods like generalized least squares (GLS) or computing robust standard errors, such as those derived from the Newey-West procedure. For researchers and students interested in the theoretical foundations and advanced applications of testing and correcting serial correlation, consulting specialized textbooks on time series analysis and econometrics is highly recommended to ensure the robustness of model inferences.
Mastering the methodology for detecting and addressing autocorrelation is an indispensable skill for validating and ensuring the efficiency of any OLS regression model applied to sequential data.
Cite this article
Mohammed looti (2025). Perform a Durbin-Watson Test in Excel. PSYCHOLOGICAL STATISTICS. Retrieved from https://statistics.arabpsychology.com/perform-a-durbin-watson-test-in-excel/
Mohammed looti. "Perform a Durbin-Watson Test in Excel." PSYCHOLOGICAL STATISTICS, 5 Nov. 2025, https://statistics.arabpsychology.com/perform-a-durbin-watson-test-in-excel/.
Mohammed looti. "Perform a Durbin-Watson Test in Excel." PSYCHOLOGICAL STATISTICS, 2025. https://statistics.arabpsychology.com/perform-a-durbin-watson-test-in-excel/.
Mohammed looti (2025) 'Perform a Durbin-Watson Test in Excel', PSYCHOLOGICAL STATISTICS. Available at: https://statistics.arabpsychology.com/perform-a-durbin-watson-test-in-excel/.
[1] Mohammed looti, "Perform a Durbin-Watson Test in Excel," PSYCHOLOGICAL STATISTICS, vol. X, no. Y, ص Z-Z, November, 2025.
Mohammed looti. Perform a Durbin-Watson Test in Excel. PSYCHOLOGICAL STATISTICS. 2025;vol(issue):pages.