Tutorials › Exam SRM - Statistics for Risk Modeling › Durbin-Watson Diagnostics for Residual Dependence

Exam SRM · Regression Diagnostics · Tutorial 96 of 926

Durbin-Watson Diagnostics for Residual Dependence

Calculate the Durbin-Watson statistic, interpret its direction and magnitude, and understand why it is not a universal test of residual independence.

Intermediate 10 min read

What You'll Learn

  • Define the Durbin-Watson statistic for residuals in a meaningful observation order
  • Calculate the statistic from adjacent residual differences
  • Derive its exact relationship to a lag-one residual cross-product and its common approximation
  • Interpret values near zero, two, and four without treating them as automatic decisions
  • Identify key testing assumptions, limitations, and the special case of a single observation

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.

Definition: Let \(e_t=y_t-\hat{y}_t\) be the ordinary least squares residual for observation \(t\), with observations in a meaningful order. For \(n\ge 2\) and \(\sum_{t=1}^n e_t^2>0\), the Durbin-Watson statistic is $$ D=\frac{\sum_{t=2}^{n}(e_t-e_{t-1})^2}{\sum_{t=1}^{n}e_t^2}. $$ It compares the sum of squared differences between consecutive residuals with the overall residual sum of squares.

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

$$ \begin{aligned} \sum_{t=2}^{n}(e_t-e_{t-1})^2 &=\sum_{t=2}^{n}e_t^2+\sum_{t=2}^{n}e_{t-1}^2-2\sum_{t=2}^{n}e_t e_{t-1}\\ &=(S-e_1^2)+(S-e_n^2)-2P\\ &=2S-e_1^2-e_n^2-2P. \end{aligned} $$

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.

Result: For \(n\ge2\), \(S>0\), and \(r_1=P/S\), the exact relationship is $$ D=2(1-r_1)-\frac{e_1^2+e_n^2}{S}. $$ When the endpoint contribution \((e_1^2+e_n^2)/S\) is small, a useful approximation is \(D\approx2(1-r_1)\). The approximation is less accurate when one or both endpoint residuals contribute substantially to \(S\).

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\):

$$ \sum_{t=2}^{n}(e_t-e_{t-1})^2 \le 2\sum_{t=2}^{n}(e_t^2+e_{t-1}^2) \le 4S. $$

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.

1
Check whether the diagnostic applies.
Confirm there are at least two observations, the residual sum of squares is positive, and the observation order is meaningful.
2
Calculate the statistic.
Use the adjacent-difference definition, retaining every consecutive pair in the stated order.
3
Read the direction cautiously.
Values below 2 suggest positive first-order dependence; values above 2 suggest negative first-order dependence.
4
Make a formal decision only with the right reference.
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.
Key takeaway: Calculate \(D\) from all adjacent residual differences in a justified order. Values below and above 2 suggest positive and negative first-order residual dependence, respectively, but approximation, formal testing, and interpretation all require attention to endpoint residuals, model assumptions, and the test’s limitations. This diagnostic is aligned with the SOA Exam SRM (Statistics for Risk Modeling) syllabus.

Check Your Understanding

For each calculation, use the residuals in the order given. Round numerical values to four decimal places when needed.

  1. 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.)
  2. 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.)
  3. 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\).)
  4. For residuals \(1,1,-1,-1\), calculate \(D\) and describe the direction it suggests. (Answer: \(D=1.0000\); positive first-order dependence is suggested.)
  5. 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\).)
Clinical Biostats