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 3 Find the value of the test statistic. We have , and there are runs. Then
Finally, the test statistic is