Next: Gap Test Up: Tests for Random Numbers Previous: Runs Tests

## Tests for Auto-correlation

• The tests for auto-correlation are concerned with the dependence between numbers in a sequence.

• The list of the 30 numbers on page 311 appears to have the effect that every 5th number has a very large value. If this is a regular pattern, we can't really say the sequence is random.

• The test computes the auto-correlation between every m numbers (m is also known as the lag) starting with the ith number.

Thus the autocorrelation between the following numbers would be of interest.

The value M is the largest integer such that where N is the total number of values in the sequence.

E.g. N = 17, i = 3, m = 4, then the above sequence would be 3, 7, 11, 15 (M = 2). The reason we require M+1 instead of M is that we need to have at least two numbers to test (M = 0) the autocorrelation.

• Since a non-zero autocorrelation implies a lack of independence, the following test is appropriate

• For large values of M, the distribution of the estimator , denoted as , is approximately normal if the values are uncorrelated.

• Form the test statistic

which is distributed normally with a mean of zero and a variance of one.

• The actual formula for and the standard deviation is

and

• After computing , do not reject the null hypothesis of independence if

where is the level of significance.

• See Example 8.12 on page 312.

Next: Gap Test Up: Tests for Random Numbers Previous: Runs Tests
Meng Xiannong 2002-10-18