Example of a runs test
main topic
     interpreting results     session command     see also 

Suppose an interviewer selects 30 people at random and asks them each a question for which there are four possible answers. Their responses are coded 0, 1, 2, 3. You wish to perform a runs test in order to check the randomness of answers. Answers that are not in random order may indicate that a gradual bias exists  in the phrasing of the questions or that subjects are not being selected at random.

1    Open the worksheet EXH_STAT.MTW.

2    Choose Stat > Nonparametrics > Runs Test.

3    In Variables, enter Response. Click OK.

Session window output

Runs Test: Response

 

 

Runs test for Response

 

Runs above and below K = 1.23333

 

The observed number of runs = 8

The expected number of runs = 14.9333

11 observations above K, 19 below

P-value = 0.005

Interpreting the results

Because the option of a value other than the mean was not specified as the comparison criterion (K), the mean, 1.233, was used. There are eight runs.

(0, 0, 1, 0, 1, 1, 1, 1)  (2, 3, 3, 2)  (0, 0, 0)  (2)  (1, 1, 1, 1)  (2, 3, 3)  (0, 0, 1, 0)  (2, 2, 3)

To determine if this is an unusual number of runs, Minitab calculates the number of observations above and below K. From these values, Minitab calculates the expected number of runs. Because the resulting p-value (0.0055) is smaller than the alpha level of 0.05, there is sufficient evidence to conclude that the data are not in random order.