Wald–Wolfowitz Runs Test Lecture 54

Wald–Wolfowitz-Run-Test 

Lecture 54

The Wald–Wolfowitz runs test was developed by Abraham Wald and Jacob Wolfowitz. It is a non-parametric test used to determine whether the sample(s) selected from a population(s) is a random process or the observation in a sample from a random sequence or not. The runs test is used to analyse whether the observations in a sample are random and also used to detect the autocorrelation.

A run may be defined as a subsequence of one or more identical symbols (signs or letters) followed and preceded by different symbols (signs or letters) or no symbols at all.

For example, the sequences: HHTTTHHHHTT

Sequence

No. of Runs

AAAA, BB, AAA, BBB

4

++++, - - - - -, +++, - - -, ++++

5

A data set with a high number of runs may indicate randomness, but a data set with a low number of runs may suggest a pattern that is not random.


One Sample Run Test

To perform a one-sample runs test:

i. Arrange the observations in ascending order of magnitude and find the median.

ii. Replace each observation with a plus sign if the observation is above the median and with a minus if the observation is below the median.

iii. Ignore the observation that is equal to the median.

iv. The total number of runs is denoted by nr, and one kind of symbols or letters is denoted by n1, and the other kind of symbols or letters is denoted by n2 .

v. Reject the null hypothesis if nr is less than the smaller table value or greater than the larger table value.

Normal approximation:

If n1 and n2 are greater than 10, then nr follows approximately normal with mean μr and standard deviation σr.


Two Sample Runs Test

The two-sample run test is also called the Wald-Wolfowitz runs test. To carry out the test, write down the observations of both samples in one sequence according to their magnitude. Write down the letter A for each observation of sample 1 and the letter B for each observation of sample 2, thus getting a sequence of A’s and B’s. The remaining procedure is the same as the one for the sample runs test.

Example 13.7: A research student invites 15 persons for interview in the following sequence:

M F F M F M F M M F F M F F F

Where M and F represent male and female, respectively. Does this sequence indicate a sequence from randomness in the arrangement of M and F answers?

Solution:

i. State the null and alternative hypotheses:

H0: The sequence is random vs. H1: The sequence is non-random.

ii. The significance level: α = 0.05

iii. The test statistic: As n1 and n2 are less than 10. The test statistic is denoted by nr.

iv. Reject H0 if nr < 4 or nr > 13.

n1 is used to represent the number of males = 6

n2 is used to represent the number of females = 9

The critical table values against 6 and 9 are 4 and 13.

v. Computation:


nr = 10
vi. Remarks: The calculated number of runs falls in the acceptance region; the sample data does not provide sufficient evidence to reject the null hypothesis sequence from randomness. Thus, it is concluded that the invitation is to a male and female in a sequence.
Example 13.8: A true-false paper is made to check the performance of the students. The papers are checked by a computerised assist program. The following sequence of true and false are obtained as:
T FF T F T  F TT F T FF T F T F T F TT F

Does this sequence indicate a sequence arrangement of T and F answers, a systematic fashion?

Solution:

i. State the null and alternative hypotheses:

H0: The sequence of true and false is random vs. H1: The sequence of true and false is non-random.

ii. The significance level: α = 0.05

iii. The test statistic: As n1 and n2 are greater than 10. The normal approximation test statistic is used.


iv. Reject Ho when |Z| ≥ 1.96
v. Computation:

nr = 18
n1 = 11
n2 = 11

vi. Remarks: The calculated z value falling in the acceptance region, so the sample data does not provide sufficient evidence to reject the null hypothesis. Thus, we conclude that the sequence of answers is random.
Example 13.9: Apply the runs test to determine the following sequence is random:

3.6

3.9

4.1

3.6

3.8

3.7

3.4

4.0

3.8

4.1

3.9

4.0

3.8

4.2

4.1


Solution:

i. State the null and alternative hypotheses:

H0: The sequence is random vs. H1: The sequence is non-random.

ii. The significance level: α = 0.05

iii. The test statistic: As n1 and n2 are less than 10. The test statistic is denoted by nr.

iv. Computation: Compute median and then construct in pluses and minuses

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

3.4

3.6

3.6

3.7

3.8

3.8

3.8

3.9

3.9

4.0

4.0

4.1

4.1

4.1

4.2




nr = 8
n1 = 7
n2 = 6
v. Reject H0 if nr < 3 or nr > 12.
vi. Remarks: The calculated value of nr = 8 falling in the acceptance region, so we have not sufficient evidence to reject the null hypothesis. Thus, it is concluded that the sequence is random.

Example 13.10: Apply the run test and test the hypothesis that the following two samples are random.

Sample 1

26

25

38

33

42

40

44

26

25

43

35

48

37

 

 

 

Sample 2

44

30

34

47

35

46

35

47

48

34

32

42

43

49

46

47


Solution: 

i. State the null and alternative hypotheses:

H0: The sequence is random vs. H1: The sequence is non-random.

ii. The significance level: α = 0.05

iii. The test statistic: As n1 and n2 are greater than 10. The normal approximation test statistic is used.

iv. Reject Ho when |Z| ≥ 1.96
v. Computation: Arrange the observations of both samples in a single sequence. Represent sample 1 observations by letter A and sample observations by letter B.

25

25

26

26

30

32

33

34

34

35

35

35

37

38

40

42

42

43

44

44

A

B

A

B

A

B

A

B

A

B

A

46

46

47

47

47

48

48

49

 

 

 

 

 

 

 

 

 

B

A

B

 

 

 

 

 

 

 

 

 

nr = 14
n1 = 13
n2 = 16


vi. Remarks: The z-calculated value falls in the acceptance area, so we do not have sufficient evidence to reject the null hypothesis. Thus, it is concluded that the sequence is random.

 



No comments:

Post a Comment

Moving Average Models (MA Models) Lecture 17

  Moving Average Models  (MA Models)  Lecture 17 The autoregressive model in which the current value 'yt' of the dependent variable ...