Testing For Autocorrelation – Durbin-Watson Test

Durbin Watson test is a statistical test use to detect the presence of autocorrelation in the residuals of a regression analysis. The value of DW statistic always ranges between 0 and 4.

In stock market, positive autocorrelation (when DW<2) in stock prices suggests that the price movements have a persistent trend. Positive autocorrelation indicates that the variable increased or decreased on a previous day, there is a there is a tendency for it to follow the same direction on the current day. For example, if the stock fell yesterday, there is a higher likelihood it will fall today. Whereas the negative autocorrelation (when DW>2) indicates that if a variable increased or decreased on a previous day, there is a tendency for it to move in the opposite direction on the current day. For example, if the stock fell yesterday, there is a greater likelihood it will rise today.

Assumptions for the Durbin-Watson Test:

  • The errors are normally distributed, and the mean is 0.
  • The errors are stationary.

Calculation of DW Statistics

Where et is the residual of error from the Ordinary Least Squares (OLS) method.

The null hypothesis and alternate hypothesis for the Durbin-Watson Test are:

  • H0: No first-order autocorrelation in the residuals ( ρ=0)
  • HA: Autocorrelation is present.

Formula of DW Statistics

[Tex]d = \frac{\sum_{t=2}^{T}(e_t – e_{t-1})^2}{\sum_{t=1}^{T}e_{t}^{2}} [/Tex]

Here,

  • et is the residual at time t
  • T is the number of observations.

Interpretation of DW Statistics

  • If the value of DW statistic is 2.0, it suggests that there is no autocorrelation detected in the sample.
  • If the value is less than 2, it suggests that there is a positive autocorrelation.
  • If the value is between 2 and 4, it suggests that there is a negative autocorrelation.

Decision Rule

  • If the Durbin-Watson test statistic is significantly different from 2, it suggests the presence of autocorrelation.
  • The decision to reject the null hypothesis depends on the critical values provided in statistical tables for different significance levels.

AutoCorrelation

Autocorrelation is a fundamental concept in time series analysis. Autocorrelation is a statistical concept that assesses the degree of correlation between the values of variable at different time points. The article aims to discuss the fundamentals and working of Autocorrelation.

Table of Content

  • What is Autocorrelation?
  • What is Partial Autocorrelation?
  • Testing For Autocorrelation – Durbin-Watson Test
  • Need For Autocorrelation in Time Series
  • Autocorrelation Vs Correlation
  • Difference Between Autocorrelation and Multicollinearity
  • How to calculate Autocorrelation in Python?
  • How to Handle Autocorrelation?
  • Frequently Asked Questions (FAQs)

Similar Reads

What is Autocorrelation?

Autocorrelation measures the degree of similarity between a given time series and the lagged version of that time series over successive time periods. It is similar to calculating the correlation between two different variables except in Autocorrelation we calculate the correlation between two different versions Xt and Xt-k of the same time series....

What is Partial Autocorrelation?

In time series analysis, the partial autocorrelation function (PACF) gives the partial correlation of a stationary time series with its own lagged values, regressed the values of the time series at all shorter lags. It is different from the autocorrelation function, which does not control other lags....

Testing For Autocorrelation – Durbin-Watson Test

Durbin Watson test is a statistical test use to detect the presence of autocorrelation in the residuals of a regression analysis. The value of DW statistic always ranges between 0 and 4....

Need For Autocorrelation in Time Series

Autocorrelation is important in time series as:...

Autocorrelation Vs Correlation

Autocorrelation refers to the correlation between a variable and its past values at different lags in a time series. It focuses on understanding the temporal patterns within a single variable. Correlation representations the statistical association between two distinct variables. It focuses on accessing the strength and direction of the relationship between separate variables. Autocorrelation measures metrics as ACF and PACF, which quantify the correlation between a variable and its lagged values. Correlation measures using coefficients like Pearson correlation coefficient for linear relationships or Spearman rank correlation for non-linear relationships, providing a single value ranging from -1 to 1....

Difference Between Autocorrelation and Multicollinearity

Feature Autocorrelation Multicollinearity Definition Correlation between a variable and its lagged values Correlation between independent variables in a model Focus Relationship within a single variable over time Relationship among multiple independent variables Purpose Identifying temporal patterns in time series data Detecting interdependence among predictor variables Nature of Relationship Examines correlation between a variable and its past values Investigates correlation between independent variables Impact on the model Can lead to biased parameter estimates in time series models Can lead to inflated standard errors and difficulty in isolating individual variable effects Statistical Test Ljung-Box test, Durbin-Watson statistic Variance Inflation Factor (VIF), correlation matrix, condition indices...

How to calculate Autocorrelation in Python?

This section demonstrates how to calculate the autocorrelation in python along with the interpretation of the graphs. We will be using google stock price dataset, you can download the dataset from here....

How to Handle Autocorrelation?

To handle autocorrelation in a model,...

Also Check:

How to Calculate Autocorrelation in R?Types of AutocorrelationHow to Calculate Autocorrelation in Python?Autocorrelation plot using MatplotlibPython Pandas – Plotting the Autocorrelation PlotAutocorrelation and Partial AutocorrelationDurbin Watson TestPython | Pandas Series.autocorr()...

Frequently Asked Questions (FAQs)

Q. What is autocorrelation vs. correlation?...