13-7 Runs Test for Randomness 687 Runs Test for Randomness Objective Apply the runs test for randomness to a sequence of sample data to test for randomness in the order of the data. Use the following null and alternative hypotheses: H0: The data are in a random order. H1: The data are in an order that is not random. Notation n1 = number of elements in the sequence that have one particular characteristic. (The characteristic chosen for n1 is arbitrary.) n2 = number of elements in the sequence that have the other characteristic G = number of runs Requirements 1. The sample data are arranged according to some ordering scheme, such as the order in which the sample values were obtained. 2. Each data value can be categorized into one of two separate categories (such as male>female). Test Statistic and Critical Values KEY ELEMENTS For Small Samples and A = 0.05: If n1 … 20 and n2 … 20 and the significance level is a = 0.05, the test statistic, critical values, and decision criteria are as follows: • Decision criteria: Reject randomness if the number of runs G is such that • G… smaller critical value found in Table A-10. • or GÚ larger critical value found in Table A-10. For Large Samples or A 3 0.05: If n1 7 20 or n2 7 20 or a ≠ 0.05, the test statistic, critical values, and decision criteria are as follows: • Critical values of z: Use Table A-2. • Decision criteria: Reject randomness if the test statistic z is such that • z … negative critical z score (such as -1.96). • or z Ú positive critical z score (such as 1.96). • Test statistic: number of runs G • Critical values of G: Use Table A-10. • Test statistic: z = G - mG sG where mG = 2n1n2 n1 + n2 + 1 and sG = B12n1n22 12n1n2 - n1 - n22 1n1 + n2 21n 1 + n2 - 12

RkJQdWJsaXNoZXIy NjM5ODQ=