Durbin-Watson Statistic (d ≈ 2(1 − ρ)) & First-Order AR(1) Autocorrelation Calculator

Convert Durbin-Watson d (0–4) into first-order serial correlation ρ and GLS quasi-differencing weight.

Implied AR(1) Serial Correlation (ρ) 0.38 ρ (−1 to +1)
Effective Independent Sample Size (N_eff) 35.942 obs
Prais-Winsten First-Obs Weight √(1−ρ²) 0.925 weight
Distance from Ideal d = 2.00 -0.76 Δd
Inputs
Try:
d (0–4)
Durbin-Watson test statistic d (0.0 to 4.0; d=2.0 means zero autocorrelation).
N
Number of time-series observations N.
Results & Graph
Implied AR(1) Serial Correlation (ρ)
0.38 ρ (−1 to +1)
Effective Independent Sample Size (N_eff)
35.942 obs
Prais-Winsten First-Obs Weight √(1−ρ²)
0.925 weight
Distance from Ideal d = 2.00
-0.76 Δd

Implied AR(1) Serial Correlation (ρ)

Graph 1 • How the inputs feed Durbin-Watson d & AR(1) ρ
Durbin-Watson Statistic (d ≈ 2(1 − ρ)) & First-Order AR(1) Autocorrelation Calculator • Custom Domain Schematic (Econometrics & Regression) durbinWatimeSeriDurbin-Watson d & AR(1 Durbin Watson Statistic D: 1.24 d (0–4) • Time Series Sample Size N: 80 N IMPLIED AR(1) SERIAL CORRE 0.38 ρ (−1 to +1) • Effective Independent : 35.942 obs • Prais-Winsten First-Ob: 0.925 weight Eq: Implied_ρ ≈ 1 − (d / 2); Effec
Graph 2 • Implied AR(1) Serial Correlation (ρ) as Durbin Watson Statistic D changes (40% to 160% of current)
0 ρ (−1 0.550 ρ (−1 1.10 ρ (−1 0.752 0.496 0.628 0.744 0.504 0.992 0.380 1.24 0.256 1.49 0.132 1.74 0.00800 1.98
Graph 3 • Durbin Watson Statistic D and Time Series Sample Size N together Compares Implied AR(1) Serial Correlation (ρ) when Time Series Sample Size N is shifted +25% (solid) vs. −25% (dashed).
0 ρ (−1 0.550 ρ (−1 1.10 ρ (−1 --- Time Series Sample Size N @ 75% 0.566 -30% 0.473 -15% 0.380 +0% 0.287 +15% 0.194 +30%
Summary: A Durbin-Watson statistic of d = 1.24 implies first-order autocorrelation ρ ≈ 0.38, reducing 80 nominal observations to ~35.9 effective independent observations.
Summary: A Durbin-Watson statistic of d = 1.24 implies first-order autocorrelation ρ ≈ 0.38, reducing 80 nominal observations to ~35.9 effective independent observations.
Interactive chart & math engine powered by CalculatorGraph

Formula: Durbin-Watson d & AR(1) ρ Formula

Implied_ρ ≈ 1 − (d / 2)
EffectiveIndependentN ≈ N × 1 − ρ1 + ρ
Implied_ρ ≈ 1 − (d / 2); EffectiveIndependentN ≈ N × (1 − ρ) / (1 + ρ)
  • durbinWatsonStatisticD: Durbin Watson Statistic D (d (0–4))
  • timeSeriesSampleSizeN: Time Series Sample Size N (N)

Frequently Asked Questions

Where do I get the Durbin-Watson value to enter?

Most regression output prints it beside R-squared, often labelled Durbin-Watson or DW. If yours does not, compute it from the residuals in time order: add up the squared differences between each residual and the one before it, then divide by the sum of squared residuals. The calculator does not compute d itself; it starts from the value you supply.

Is rho from 1 minus d/2 the same as the sample autocorrelation of my residuals?

Close but not identical. The exact relation subtracts an end-point term involving the first and last residuals. With 80 observations the difference is negligible. With very short series it can be large: six residuals of 1, 2, 1, -1, -2, -1 give d of about 0.67, which implies 0.67, while the direct autocorrelation is about 0.58.

Does d = 1.24 with 80 observations mean I have a problem?

It points to positive autocorrelation of about 0.38, which is enough to understate standard errors. Whether it is statistically significant depends on the dL and dU bounds for 80 observations and your number of regressors, which this page does not compute. Look those up, and if d is below dL, correct the model or use robust standard errors.

What should I do with the effective sample size figure?

Use it as a warning about how much precision autocorrelation costs you. The default turns 80 observations into 35.942 effective ones, so intervals from plain least squares are noticeably too narrow. It is derived for a sample mean, so do not plug it in as exact degrees of freedom for regression coefficients.

What does the effective sample size show when d is above 2?

It shows N. Above 2 the implied rho is negative, and the uncapped mean formula would claim more independent observations than you have. The engine caps the figure at the real sample, so d = 2.6 and d = 3.9 both report 80 for the default. Negative autocorrelation in residuals usually signals overdifferencing or a wrong model, so investigate it.

How do I use rho 0.38 in a Cochrane-Orcutt regression?

Create transformed variables y_t minus 0.38 times y_t-1 and the same for each predictor, drop the first row, and run least squares. Divide the new intercept by 0.62 to recover the original one. Then re-estimate rho from the new residuals and repeat until it settles. The calculator supplies only the first rho.

Should I choose Cochrane-Orcutt or Prais-Winsten?

Prais-Winsten keeps the first observation by scaling it by the weight on this page, 0.925 at the default, so it uses all your data. That matters most in short series. With long series the two give almost the same coefficients, and either is a reasonable choice.

Can I use the Durbin-Watson test if my model includes last period's y?

No. A lagged dependent variable biases d toward 2, so the test can miss autocorrelation that is really there. Use Durbin's h statistic or the Breusch-Godfrey test instead, both of which are designed for models with lagged dependent variables and are available in most econometrics software.

What is the largest or smallest d I can enter?

The statistic runs from 0 to 4, and the calculator accepts exactly that range; anything outside it returns an error. At exactly 2 it gives rho of 0, an effective size equal to N, and a weight of 1. At 0, rho is 1 and the weight is 0. The sample size must be a whole number of 6 or more.

Does a d near 2 guarantee my errors are independent?

No. It only says there is little correlation at lag one. Seasonal data can have strong correlation at lag four or twelve while d stays near 2. Errors can also be heteroskedastic or non-normal. Check a residual autocorrelation plot before concluding the model is clean.

Are robust standard errors an alternative to transforming the data?

Often, yes. Newey-West standard errors keep the ordinary least squares coefficients and widen the standard errors to allow for autocorrelation, without estimating rho at all. Transforming with Cochrane-Orcutt or Prais-Winsten changes the coefficients and can be more efficient if the AR(1) model is right. Many analysts report robust errors first and use the rho here as a quick check on how serious the problem is.

Why does the result change only slightly between d = 1.9 and d = 2?

Because rho moves in steps of half the change in d. Going from 1.9 to 2 shifts rho from 0.05 to 0, the effective sample from 72.381 to the full 80, and the weight from 0.999 to 1. Small departures from 2 are rarely worth correcting; the cost grows quickly only once rho passes about 0.3.

From d = 1.24 to rho 0.38 in one subtraction

You give this calculator two things: a Durbin-Watson statistic that your regression software has already printed, and the number of time-series observations behind it. The default is d = 1.24 from a regression on 80 observations, a fairly typical value for monthly or quarterly data where residuals drift in runs.

The headline result is an implied first-order autocorrelation of 0.38. The working is a single line: rho is approximately 1 minus d/2, so 1 minus 0.62 gives 0.38. Below that the page shows an effective independent sample size of 35.942 observations, a Prais-Winsten first-observation weight of 0.925, and a distance of -0.76 from the ideal value of 2.

Read together, those say the residuals are moderately positively autocorrelated. Each error carries roughly 38% of the previous error forward, and that persistence means your 80 observations carry about as much independent information as 36 would. Standard errors from ordinary least squares on this data will be too small, and t-statistics too large, unless you correct for it.

Which numbers the engine computes and which you work out yourself

The engine does four calculations from d and N: rho = 1 minus d/2, the effective sample size N times (1 minus rho) over (1 plus rho), the weight equal to the square root of (1 minus rho squared), and d minus 2. Nothing else.

It does not compute d from residuals. You must bring d from your regression output or calculate it yourself. It does not look up the Durbin-Watson critical bounds, so it never tells you whether d is significant. It also does not run the Cochrane-Orcutt or Prais-Winsten regression; it only gives you the rho and the first-row weight those procedures need.

The name on the page mentions Cochrane-Orcutt, so it helps to be clear that the transformation itself is something you carry out in your own software or spreadsheet using the rho from here. The sections below show how to do each of those hand steps.

Computing d from your residuals, and why 1 minus d/2 is approximate

The Durbin-Watson statistic is the sum of squared differences between consecutive residuals, divided by the sum of squared residuals. In symbols, d = sum of (e_t minus e_t-1) squared, for t from 2 to N, over the sum of e_t squared for t from 1 to N.

A short example shows the mechanics. Take six residuals: 1, 2, 1, -1, -2, -1. The successive differences are 1, -1, -2, -1 and 1, whose squares sum to 8. The squared residuals sum to 12. So d = 8/12, about 0.67, a strong sign of positive autocorrelation.

Now estimate rho directly. Multiply each residual by the one before it and add up: 2 + 2 - 1 + 2 + 2 = 7. Divide by the sum of squares, 12, and the sample autocorrelation is about 0.58. The calculator's shortcut, 1 minus d/2, would say 0.67.

The two disagree because the exact identity is d = 2(1 minus rho-hat) minus (e_1 squared + e_N squared) over the sum of squares. The end-point term is tiny with 80 observations and large with six. With long series, as in the default, the shortcut is close enough for practical use. With short series, compute rho from the residuals directly and use that instead.

Effective sample size: 35.942 out of 80

The effective sample size line comes from the variance of a mean taken over an AR(1) series. With positive rho, neighbouring observations repeat part of the same information, so N times (1 minus rho) over (1 plus rho) shrinks the count. With the default rho of 0.38, 80 times 0.62 over 1.38 gives 35.942.

The shrinkage accelerates quickly. The 0.74 preset gives rho of 0.63 and only 18.16 effective observations, under a quarter of the nominal count. The 1.9 preset gives rho of 0.05 and 72.381 effective observations, close to the full 80. I also tried d = 0.2, which implies rho of 0.9; the effective sample collapses to about 4.2.

A practical way to use the figure is to compare it with the number of parameters you are estimating. If your model has six predictors and the effective sample is 18.16, as in the 0.74 preset, you are fitting a lot of structure to very little independent information, and even corrected standard errors deserve caution.

Treat this figure as a rough guide to how much your confidence intervals are understated, not as an exact degrees-of-freedom value to plug into a test. It is derived for a sample mean. Regression slopes are affected by autocorrelation in the predictors as well as the errors, so the true loss of information can be larger or smaller.

Negative autocorrelation is handled differently. For a sample mean, the raw formula would reward alternating errors with an effective sample larger than the data you collected. The engine caps the figure at N instead, so at d = 2.6 (rho of -0.3) and even at d = 3.9 (rho of -0.95) it reports 80, the real count. That is the sensible reading: you never gain observations from autocorrelation, and negative autocorrelation in regression residuals more often points to overdifferencing or a misspecified model than to extra precision.

Applying the Cochrane-Orcutt transform with the rho from here

Once you have rho, the Cochrane-Orcutt procedure removes first-order autocorrelation by quasi-differencing. For every observation from the second onward, replace y_t with y_t minus rho times y_t-1, and replace each predictor x_t with x_t minus rho times x_t-1. Then rerun ordinary least squares on the transformed data.

With the default rho of 0.38 you would subtract 38% of last period's value from each current value. The first observation has no previous value, so Cochrane-Orcutt drops it, leaving 79 rows from the original 80.

The intercept also changes meaning. The constant in the transformed regression estimates the original intercept times (1 minus rho), so divide it by 0.62 to get back to the original scale. Slope coefficients need no such adjustment.

In the full procedure you then compute new residuals from the original, untransformed equation using the new coefficients, re-estimate rho from those residuals, and repeat until rho stops changing. The calculator gives you only the starting value from d, so the iteration has to happen in your statistics package. Many packages run it automatically when you ask for an AR(1) error correction.

The 0.925 first-row weight and the Prais-Winsten variant

Dropping the first observation is harmless with 80 rows but costly with 15. The Prais-Winsten method keeps it by scaling instead of differencing. Multiply the first value of y and of each predictor, including the column of ones for the intercept, by the square root of (1 minus rho squared). Every later row gets the same quasi-differencing as Cochrane-Orcutt.

That multiplier is the weight on the page. With rho of 0.38 it is 0.925, so the first row keeps most of its influence. With the 0.74 preset it falls to 0.777, and with the 1.9 preset it is 0.999, effectively unchanged. When rho approaches 1 the weight approaches zero and Prais-Winsten starts to behave like Cochrane-Orcutt.

Prais-Winsten is usually preferred in short samples because it uses all the data and is the full generalised least squares estimator for AR(1) errors. With long series the two methods give nearly identical coefficients.

Judging significance: what -0.76 from 2 does and does not tell you

The fourth output, -0.76, is simply d minus 2. A negative value points to positive autocorrelation and a positive value to negative autocorrelation. It is a sign and size, not a test.

To decide whether d = 1.24 is significant you need the Durbin-Watson lower and upper bounds, dL and dU, for your sample size and number of regressors, taken from published tables or your software. If d falls below dL, you reject the null of no positive autocorrelation. Between dL and dU the test is inconclusive. Above dU you do not reject. For negative autocorrelation you apply the same bounds to 4 minus d.

The page does not ask for the number of regressors, so it cannot compute those bounds. Do not treat a single cut-off such as d below 1.5 as a universal rule, because the bounds move with both N and the number of predictors.

Models where the d statistic misleads

The Durbin-Watson test assumes the regression includes an intercept, that the regressors are fixed rather than lagged values of the dependent variable, and that the data are in time order with no gaps. Break any of those and both d and the rho derived from it become unreliable.

The most common failure is a model with a lagged dependent variable, such as sales this month regressed on sales last month. In that setting d is biased toward 2 and can hide real autocorrelation. Durbin's h test or the Breusch-Godfrey test is the usual replacement.

The test also only looks at lag one. Quarterly data with a seasonal pattern can have strong correlation at lag four and an unremarkable d. If you suspect higher-order structure, inspect the residual autocorrelation function rather than relying on this single figure.

The inputs are checked rather than adjusted. A d outside 0 to 4, or a sample size that is not a whole number of at least 6, returns an error message instead of a result, so if the page refuses your entry, check whether you typed a rho or an R-squared value into the d box by mistake.