Why Residual Order Matters
A regression residual plot can reveal patterns that a summary of residual size will miss. In particular, residuals that tend to be followed by residuals of a similar sign suggest positive serial dependence; residuals that tend to alternate in sign suggest negative serial dependence. The Durbin-Watson statistic summarizes adjacent residual differences to assess this kind of first-order dependence.
The order must have meaning. For observations recorded over time, use chronological order; for another naturally ordered sequence, use that sequence. If the observations have no meaningful order, rearranging rows changes the statistic without changing the regression fit, so a Durbin-Watson calculation has no useful interpretation.
The conditions in the definition matter. With one observation there are no adjacent pairs, so the numerator is an empty sum and this diagnostic is not defined for use as a Durbin-Watson statistic. With \(n\ge 2\), a zero denominator means all residuals are zero and the ratio is undefined. In the usual nondegenerate regression fit, the denominator is positive.
Exact Relationship to Adjacent Residual Products
The statistic can be related to a lag-one residual cross-product. Define \(S=\sum_{t=1}^{n}e_t^2\) and \(P=\sum_{t=2}^{n}e_t e_{t-1}\). For \(n\ge2\), expanding each squared difference gives
In the second line, the first sum of squares omits \(e_1^2\), and the second omits \(e_n^2\). This endpoint accounting is why the common approximation is not always exact.
This derivation also explains the direction of interpretation. If adjacent residuals tend to have the same sign and similar size, their differences tend to be small, so \(D\) tends to be below 2. If adjacent residuals tend to alternate in sign, their differences tend to be large, so \(D\) tends to be above 2. These are diagnostic signals, not automatic conclusions from a test.
For \(n\ge2\), the statistic lies between 0 and 4. It is nonnegative because its numerator is a sum of squares. To see the upper bound, use \((a-b)^2\le2a^2+2b^2\):
Thus \(0\le D\le4\). A value near zero indicates very small adjacent differences relative to residual size; a value near four indicates substantial alternation. A value near two indicates little evidence of first-order dependence from this summary alone; it does not prove that errors are independent.
Worked Example: Strongly Similar Adjacent Residuals
A hypothetical regression uses five chronologically ordered observations. Its residuals, in response units, are \(2,1,0,-1,-2\). Calculate \(D\), compare it with the approximation, and interpret the result.
Method. Calculate the residual sum of squares and the sum of squared adjacent differences. This avoids relying on a direction-of-association description without checking the actual ratio.
The denominator is \(S=2^2+1^2+0^2+(-1)^2+(-2)^2=4+1+0+1+4=10\). The adjacent differences are \(1-2=-1\), \(0-1=-1\), \(-1-0=-1\), and \(-2-(-1)=-1\). Therefore the numerator is \(1+1+1+1=4\), and \(D=4/10=0.4000\), rounded to four decimal places.
For comparison, \(P=2(1)+1(2)+0(1)+(-1)(0)=4\), so \(r_1=P/S=4/10=0.4\). The approximation is \(2(1-0.4)=1.2\). The endpoint correction is \((2^2+(-2)^2)/10=8/10=0.8\), giving the exact value \(1.2-0.8=0.4000\).
The low value points toward positive first-order residual dependence. Here the approximation is notably different from the exact statistic because the endpoint residuals account for a large share of \(S\). The calculation is checked by both the original ratio and the exact relationship.
Worked Example: Alternating Residuals
A second hypothetical regression has six residuals in observation order: \(1,-1,1,-1,1,-1\). Compute \(D\), use the cross-product relationship as a check, and interpret the result.
Method. Directly compute the adjacent differences, then verify with the exact formula. This avoids confusing negative residual autocorrelation with a statistic that must itself be negative.
The denominator is \(S=1^2+(-1)^2+1^2+(-1)^2+1^2+(-1)^2=6\). Each of the five adjacent differences has magnitude 2, so the numerator is \(5(2^2)=20\). Thus \(D=20/6=3.3333\), rounded to four decimal places.
The adjacent cross-product is \(P=-1-1-1-1-1=-5\), so \(r_1=-5/6\). The approximation is \(2(1-(-5/6))=11/3=3.6667\). The endpoint correction is \((1^2+(-1)^2)/6=2/6=1/3\), so the exact value is \(11/3-1/3=10/3=3.3333\).
The value above 2 is consistent with negative first-order residual dependence: adjacent residuals alternate in sign. The statistic remains nonnegative because it is a ratio of sums of squares.
From a Diagnostic Value to a Test
A small or large statistic is a reason to investigate, not by itself a formal rejection rule. The usual Durbin-Watson test is framed around a regression model with correctly specified conditional mean and errors that, under the null hypothesis, are independent, have mean zero and constant variance. For the conventional finite-sample testing framework, normal errors are also assumed conditional on the predictors. The predictors are treated as fixed for the test, and the observations have a specified order.
The test concerns first-order serial correlation. A common alternative describes the errors using an AR(1) form, \(\varepsilon_t=\rho\varepsilon_{t-1}+u_t\), where \(u_t\) is an innovation and \(\rho\) is the first-order correlation parameter. The null is \(\rho=0\). The statistic is designed to detect departures in this direction; it does not diagnose every possible form of dependence.
Formal decision rules use lower and upper critical bounds, often written \(d_L\) and \(d_U\). The bounds depend on the sample size, the regression design, and the chosen significance level. For a test against positive serial correlation, a statistic below \(d_L\) supports rejection of the null in that direction; a statistic above \(d_U\) does not support rejection; a value between the bounds is inconclusive under the bounds procedure. A conclusion about negative correlation uses the corresponding upper-tail comparison, commonly based on \(4-D\). A candidate should use the stated test convention and critical values rather than substitute a universal cutoff.
Confirm there are at least two observations, the residual sum of squares is positive, and the observation order is meaningful.
Use the adjacent-difference definition, retaining every consecutive pair in the stated order.
Values below 2 suggest positive first-order dependence; values above 2 suggest negative first-order dependence.
Compare with bounds appropriate to the model and test, and state when the result is inconclusive.
Worked Example: Same Residuals, Different Observation Order
Suppose a hypothetical analysis has the six residual values \(1,-1,0,1,-1,0\). Compare the statistic for this order with the statistic after arranging the same values as \(1,0,-1,1,0,-1\). What does the comparison show?
Method. Compute each adjacent-difference numerator while keeping the denominator fixed. This isolates the effect of ordering and avoids treating the residual multiset as sufficient information.
For either order, \(S=1^2+(-1)^2+0^2+1^2+(-1)^2+0^2=4\).
In the first order, the differences are \(-2,1,1,-2,1\), with squared values \(4,1,1,4,1\). Their sum is 11, so \(D=11/4=2.7500\), rounded to four decimal places.
In the second order, the differences are \(-1,-1,2,-1,-1\), with squared values \(1,1,4,1,1\). Their sum is 8, so \(D=8/4=2.0000\), rounded to four decimal places. The same residual values therefore produce different statistics because their adjacent pairings changed.
The first ordering gives a value above 2, while the second gives 2 exactly. This calculation shows why an arbitrary ordering cannot support an interpretation of serial dependence. Each value is checked by dividing its adjacent-difference sum by the common denominator of 4.
Important Limitations and Common Traps
The Durbin-Watson statistic is deliberately narrow in scope. A value near 2 does not establish independence: more complicated dependence can remain, and a test can fail to detect the dependence it targets. Likewise, serial structure can be confused with a misspecified regression mean, changing variance, an unusual observation, or an inappropriate ordering. A diagnostic should be interpreted alongside the model and other residual checks.
A key testing limitation is that the conventional Durbin-Watson test is not appropriate when a lagged dependent variable is included among the regressors. In that setting, the usual null distribution and decision rules do not apply as stated. A different testing approach is needed. The test also does not replace checking whether the time spacing and modeling assumptions make the chosen ordering meaningful.
- Using the approximation as an identity. The endpoint correction is part of the exact relationship. If endpoint residuals are substantial, \(2(1-r_1)\) can be a poor approximation.
- Calling a value near 2 proof of independence. It indicates only that this statistic does not show strong first-order dependence; it is not a general independence test.
- Applying a remembered cutoff automatically. Formal bounds depend on the design, sample size, and significance level, and can yield an inconclusive region.
- Ignoring the order or the model. The statistic is meaningful only for a justified sequence and a testing framework in which the Durbin-Watson rules apply.
- Using the formula for one observation. The definition and expansion require \(n\ge2\); with \(n=1\), there are no adjacent residual differences.
Check Your Understanding
For each calculation, use the residuals in the order given. Round numerical values to four decimal places when needed.
- A regression has ordered residuals \(1,0,-1\). Calculate \(D\) and state the direction suggested by its value. (Answer: \(D=1.0000\); positive first-order dependence is suggested.)
- For residuals \(1,-1,1,-1\), calculate \(D\). What does its position relative to 2 suggest? (Answer: \(D=3.0000\); negative first-order dependence is suggested.)
- For residuals \(2,0,-2,0\), calculate \(D\) and the approximation \(2(1-r_1)\), where \(r_1=P/S\). (Answer: \(D=1.5000\), while the approximation is \(2.0000\).)
- For residuals \(1,1,-1,-1\), calculate \(D\) and describe the direction it suggests. (Answer: \(D=1.0000\); positive first-order dependence is suggested.)
- A regression has one nonzero residual and no other observations. Can the Durbin-Watson statistic be calculated from the defining formula? (Answer: No. With \(n=1\), there are no adjacent pairs, and the diagnostic requires \(n\ge2\).)