EXAMPLE 25 Runs test for randomness of numerical data classified into categories

The weather station at the University of Missouri at Columbia publishes daily information on the amount of rain that falls at Sanborn Field at the university. The following 62 observations represent the daily rainfall information for the months of July and August 2008. For example, on July 1 the weather station reported 0.00 inch of rain, and on July 2 the weather station reported 0.37 inch of rain. We categorize each day's rainfall as follows: N = no rain falling, and R = some rain falling. Test whether the sequence is random by conducting the runs test for randomness, using level of significance .

N R R N N N N R R N N R N N N N N N N N N R N R R N R R N R R
N N N N N N N N N N N R N R N N N N N R R R N N N N N R N N N

Solution

The data are ordered, because they are arranged from July 1 to August 31, 2008. Also, each data value represents one of two distinct outcomes: some rain or no rain. We may thus proceed with the hypothesis test.

  • Step 1 State the hypotheses.

    14-59

  • Step 2 Find the critical values, and state the rejection rule. We have rainy days and days with no rain. Because , the large-sample case applies. From Table 19, the critical value is 1.645, and we will reject if or if .
  • Step 3 Find the value of the test statistic. We have , and there are runs. Then

    Finally, the test statistic is

  • Step 4 State the conclusion and the interpretation. Because –1.1066 is not less than –1.645 and is not more than 1.645, we do not reject . There is insufficient evidence that the sequence is not random.