# What is the difference between test of independence and test of randomness in linear regression?

In section 3.3 of Kutner's Applied Statistical Linear Models:

Nonindependence of Error Terms

Whenever data are obtained in a time sequence or some other type of sequence, such as for adjacent geographic areas, it is a good idea to prepare a sequence plot of the residuals.

... When the error terms are independent, we expect the residuals in a sequence plot to fluctuate in a more or less random pattern around the base line 0. ...

In section 3.4

Tests for Randomness

A runs test is frequently used to test for lack of randomness in the residuals arranged in time order. Another test, specifically designed for lack of randomness in least squares residuals, is the Durbin-Watson test. This test is discussed in Chapter 12.

What is the difference of testing independence of error terms and testing of randomness in the residuals? I guess they are the same thing?

Thanks!

-
They're both testing independence against dependence, but in different ways. DW explicitly tests lag 1 autocorrelation, the runs test is somewhat sensitive to that, but also responds to other forms of dependence. It's a bit like comparing a Jarque Bera test against a Shapiro-Francia test when you're interested in normality; they both are tests of normality against non-normality, but they respond differently to different aspects of non-normality. If you're specifically interested in what a more specific test looks for, that's a good thing, otherwise it might not be. – Glen_b Jul 16 '13 at 3:44
Thanks, @Glen_b! Is test for non-correlatedness viewed as a kind of test of randomness? – Tim Jul 16 '13 at 3:51
While it's not usually referred to that way, obviously it is the case - clearly if its rejected the data are dependent. – Glen_b Jul 16 '13 at 7:12