# Wald-Wolfowitz runs test

Talk0*34,117*pages on

this wiki

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. I.e. the following sequence: ++++---+++--++++++---- is divided in six runs, three of them are made out of + and the others are made out of -. If +s and -s alternate with each other in a random order, the number of runs is a random var whose distribution has:

- mean: , with

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:

- test the randomness of a distribution, by taking the data in the same order they have been taken and marking with + the ones above the median and with - the ones below the median.
- test whether a function fits well 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 considered complementary to chi square test, that takes into account the distance but not the signs.

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

## See alsoEdit

This page uses Creative Commons Licensed content from Wikipedia (view authors). |