Runs Test

$n_1 = $ $n_2=$

This applet computes probabilities for the Wald–Wolfowitz Runs Test. If there is a sequence of $n_1$ elements of type 1 and $n_2$ elements of type 2, then the test specifies

The test is based upon the number of "runs" in the sequence (see the example below).


To compute a probability, select $P(X=x)$ from the drop-down box, enter a numeric $x$ value, and press "Enter" on your keyboard. The probability $P(X=x)$ will appear in the pink box. Select $P(X \leq x)$ from the drop-down box for a left-tail probability (this is the cdf).


If $n_1=2$ and $n_2=3$, then there are ${5 \choose 2}=10$ possible sequences.

Thus, assuming the sequence is random, $P(X=2)=0.2,$ $P(X=3)=0.3,$ $P(X=4)=0.4,$ and $P(X=5)=0.1$.