Wald-Wolfowitz runs test

From Wikipedia, the free encyclopedia

The runs test (also called Wald-Wolfowitz test) is a non-parametric test that checks the randomness hypothesis of a data sequence.

A 'run' is a sequence of adjacent equal symbols. For example, the sequence "++++---+++--++++++----" is divided in six runs, three of them are made of + and the others are made of -. If +s and -s alternate in a random order, the number of runs is a random variable whose distribution has:

If there are too many runs more or less than foreseen, the data are likely to alternate in a nonrandom order.

Run-test can be used to:

  1. test the randomness of a distribution, by taking the data in the given order and marking with + the data greater than the median and with - the rest.
  2. test whether a function fits well to a data set, by marking with + the data above the function and with minus the data below the function. For this use, runs test that takes into account the signs but not the distance, is complementary to the chi square test, which takes into account the distance but not the signs.

Kolmogorov-Smirnov test and chi-square test are more powerful, if they can be applied.

[edit] See also

In other languages