what is the durbin watson statistic 
the durbin watson dw statistic is a test for autocorrelation in the residuals from a statistical model or regression analysis the durbin watson statistic will always have a value ranging between 0 and 4 a value of 2 0 indicates there is no autocorrelation detected in the sample values from 0 to less than 2 point to positive autocorrelation and values from 2 to 4 means negative autocorrelation 1a stock price displaying positive autocorrelation would indicate that the price yesterday has a positive correlation on the price today so if the stock fell yesterday it is also likely that it falls today a security that has a negative autocorrelation on the other hand has a negative influence on itself over time so that if it fell yesterday there is a greater likelihood it will rise today the basics of the durbin watson statisticautocorrelation also known as serial correlation can be a significant problem in analyzing historical data if one does not know to look out for it for instance since stock prices tend not to change too radically from one day to another the prices from one day to the next could potentially be highly correlated even though there is little useful information in this observation in order to avoid autocorrelation issues the easiest solution in finance is to simply convert a series of historical prices into a series of percentage price changes from day to day autocorrelation can be useful for technical analysis which is most concerned with the trends of and relationships between security prices using charting techniques in lieu of a company s financial health or management technical analysts can use autocorrelation to see how much of an impact past prices for a security have on its future price autocorrelation can show if there is a momentum factor associated with a stock for example if you know that a stock historically has a high positive autocorrelation value and you witnessed the stock making solid gains over the past several days then you might reasonably expect the movements over the upcoming several days the leading time series to match those of the lagging time series and to move upward the durbin watson statistic is named after statisticians james durbin and geoffrey watson 2special considerationsa rule of thumb is that dw test statistic values in the range of 1 5 to 2 5 are relatively normal values outside this range could however be a cause for concern the durbin watson statistic while displayed by many regression analysis programs is not applicable in certain situations for instance when lagged dependent variables are included in the explanatory variables then it is inappropriate to use this test 1example of the durbin watson statisticthe formula for the durbin watson statistic is rather complex but involves the residuals from an ordinary least squares ols regression on a set of data the following example illustrates how to calculate this statistic assume the following x y data points pair one 10 1 100 pair two 20 1 200 pair three 35 985 pair four 40 750 pair five 50 1 215 pair six 45 1 000 begin aligned text pair one left 10 1 100 right text pair two left 20 1 200 right text pair three left 35 985 right text pair four left 40 750 right text pair five left 50 1 215 right text pair six left 45 1 000 right end aligned pair one 10 1 100 pair two 20 1 200 pair three 35 985 pair four 40 750 pair five 50 1 215 pair six 45 1 000 using the methods of a least squares regression to find the line of best fit the equation for the best fit line of this data is y 2 6268 x 1 129 2 y 2 6268 x 1 129 2 y 2 6268x 1 129 2this first step in calculating the durbin watson statistic is to calculate the expected y values using the line of best fit equation for this data set the expected y values are expected y 1 2 6268 10 1 129 2 1 102 9 expected y 2 2 6268 20 1 129 2 1 076 7 expected y 3 2 6268 35 1 129 2 1 037 3 expected y 4 2 6268 40 1 129 2 1 024 1 expected y 5 2 6268 50 1 129 2 997 9 expected y 6 2 6268 45 1 129 2 1 011 begin aligned text expected y left 1 right left 2 6268 times 10 right 1 129 2 1 102 9 text expected y left 2 right left 2 6268 times 20 right 1 129 2 1 076 7 text expected y left 3 right left 2 6268 times 35 right 1 129 2 1 037 3 text expected y left 4 right left 2 6268 times 40 right 1 129 2 1 024 1 text expected y left 5 right left 2 6268 times 50 right 1 129 2 997 9 text expected y left 6 right left 2 6268 times 45 right 1 129 2 1 011 end aligned expectedy 1 2 6268 10 1 129 2 1 102 9expectedy 2 2 6268 20 1 129 2 1 076 7expectedy 3 2 6268 35 1 129 2 1 037 3expectedy 4 2 6268 40 1 129 2 1 024 1expectedy 5 2 6268 50 1 129 2 997 9expectedy 6 2 6268 45 1 129 2 1 011 next the differences of the actual y values versus the expected y values the errors are calculated error 1 1 100 1 102 9 2 9 error 2 1 200 1 076 7 123 3 error 3 985 1 037 3 52 3 error 4 750 1 024 1 274 1 error 5 1 215 997 9 217 1 error 6 1 000 1 011 11 begin aligned text error left 1 right left 1 100 1 102 9 right 2 9 text error left 2 right left 1 200 1 076 7 right 123 3 text error left 3 right left 985 1 037 3 right 52 3 text error left 4 right left 750 1 024 1 right 274 1 text error left 5 right left 1 215 997 9 right 217 1 text error left 6 right left 1 000 1 011 right 11 end aligned error 1 1 100 1 102 9 2 9error 2 1 200 1 076 7 123 3error 3 985 1 037 3 52 3error 4 750 1 024 1 274 1error 5 1 215 997 9 217 1error 6 1 000 1 011 11 next these errors must be squared and summed sum of errors squared 2 9 2 123 3 2 52 3 2 274 1 2 217 1 2 11 2 140 330 81 begin aligned text sum of errors squared left 2 9 2 123 3 2 52 3 2 274 1 2 217 1 2 11 2 right 140 330 81 text end aligned sum of errors squared 2 92 123 32 52 32 274 12 217 12 112 140 330 81 next the value of the error minus the previous error are calculated and squared difference 1 123 3 2 9 126 2 difference 2 52 3 123 3 175 6 difference 3 274 1 52 3 221 9 difference 4 217 1 274 1 491 3 difference 5 11 217 1 228 1 sum of differences square 389 406 71 begin aligned text difference left 1 right left 123 3 left 2 9 right right 126 2 text difference left 2 right left 52 3 123 3 right 175 6 text difference left 3 right left 274 1 left 52 3 right right 221 9 text difference left 4 right left 217 1 left 274 1 right right 491 3 text difference left 5 right left 11 217 1 right 228 1 text sum of differences square 389 406 71 end aligned difference 1 123 3 2 9 126 2difference 2 52 3 123 3 175 6difference 3 274 1 52 3 221 9difference 4 217 1 274 1 491 3difference 5 11 217 1 228 1sum of differences square 389 406 71 finally the durbin watson statistic is the quotient of the squared values durbin watson 389 406 71 140 330 81 2 77 text durbin watson 389 406 71 140 330 81 2 77 durbin watson 389 406 71 140 330 81 2 77note tenths place may be off due to rounding errors in the squaring