Lably
Skip to content

Wald–Wolfowitz runs test

  • 2 min read
  • 4 chapters

Related on Lably

Through Sequence, Statistical hypothesis test and Independence (probability theory)

Definition

A run of a sequence is a maximal non-empty segment of the sequence consisting of adjacent equal elements. For example, the 22-element-long sequence

+ + + + − − − + + + − − + + + + + + − − − −

consists of 6 runs, with lengths 4, 3, 3, 2, 6, and 4. The run test is based on the null hypothesis that each element in the sequence is independently drawn from the same distribution.

Under the null hypothesis, the number of runs in a sequence of N elements is a random variable whose conditional distribution given the observation of N+ positive values and N− negative values (N = N+ + N−) is approximately normal, with:

mean: μ=2N+N−N+1,variance: σ2=2N+N−(2N+N−−N)N2(N−1)=(μ−1)(μ−2)N−1.

Equivalently, the number of runs is R=12(N++N−+1−∑i=1N−1xixi+1).

These parameters do not assume that the positive and negative elements have equal probabilities of occurring, but only assume that the elements are independent and identically distributed. If the number of runs is significantly higher or lower than expected, the hypothesis of statistical independence of the elements may be rejected.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Statistics