38

Nonparametric Test

Introduction

In this module, we shall present some nonparametric tests such as the case of one sample for two measures or paired replicates between two independent samples. Likewise, we shall also discuss tests for deciding whether k independent samples are from different populations. This module also deals with the test for three or more related groups. In education, these groups can be students, teachers, administration, or schools. Furthermore, it also includes correlation analysis for ordinal and categorical data.

Objectives:

After studying this module, you should be able to:

  1. Apply Wilcoxon signed rank test, Wilcoxon-Mann-Whitney Test, Kruskal-Wallis by Ranks, Friedman Test, Spearman Rank-Order Correlation Coefficient and Chi-Square Test.
  2. Use the SPSS software on these tests involving real data.

The Wilcoxon-Mann-Whitney Test

A. Function

When variables are measured in ordinal scale, the Wilcoxon-Mann-Whitney test may be used to test whether these two groups come from the same population. This is one of the most powerful of the nonparametric tests.

Suppose that the samples are from two populations, x and y. The null hypothesis is that x and y must have the same direction. Then if the null hypothesis is rejected, we may accept the alternative hypothesis that either x is larger than y or x is smaller than y. The alternative hypothesis can also be expressed in terms of the median like the median x is greater than that of y.

For a two-tailed test, the prediction of the differences does not state the direction of the differences.

B. Method

Let m be the number of cases in the sample from group x and n be the number of cases in the sample from group y; m is always taken to be smaller or equal to n(m n). To apply the Wilcoxon test, we first pool the scores from these two groups together and rank them from the lowest to the highest. If any tied rank is encountered, assign all of them the average of the ranks that they would not have used if they were not tied. Then the ranks for the two samples are totaled and compared. Let Wx and Wy be the sum of the ranks from group x and y.

Wx = sum of ranks of groups x with m cases (Eq. 2-1a)

Wy = sum of ranks of groups y with m cases (Eq. 2-1b)

Since the sum of m and n is the total number of cases, N = m + n, we can easily show that

(Eq. 2-2)

If the null hypothesis is true, we would expect that the average rank in each of the two groups should be almost equal. If the sum of the ranks for one group is very much greater than that of the other group, there is good reason to suspect that these two groups do not belong to the same population.

When m and n are less than or equal to 10, Appendix Table C may be used to determine the exact probability associated with the occurrence when Ho is true of any Wx as extreme as an observed value of Wx.

When m or n is greater than 10, Appendix Table C cannot be used. However, it has been shown that as m and n increase in size, the sampling distribution of Wx approaches that of normal distribution with

Mean = (Eq. 2-3)

and

Variance = (Eq. 2-4)

For normal distributions, what appropriate test can you use to determine the significance of an observed Wx? The formula is

(Eq. 2-5)

The value +0.5 is used if, we wish to determine the probabilities in the left tail of the distribution and -0.5 is used if we wish to determine the probabilities in the right tail of the distribution. The critical values of z at the 0.05 and 0.01 levels of significance are 1.96 and 2.58, respectively.

C. An Illustrative Example

Degree of Anxiety of
Female Students / Degree of Anxiety of
Male Students
Scores / Rank / Scores / Rank
32
35
41
43
47
48
50
53 / 1
2
6
7
10
11
13
15
Wy = 65 / 38
39
40
45
46
49
51 / 3
4
5
8
9
12
14
Wx = 55

D. Other Considerations

The Wilcoxon test assumes that the scores are sample from a distribution which is continuous. If the instrument used to obtain these scores is highly sensitive and reliable, then the probability of getting a tie rank is almost negligible. However, when tied ranks occur, we give each of the tied observations the average of the rank they would have as if they no tied rank.

If tied ranks occurred between two or three observations in the same group, the value of Wx is not affected. But if the tied ranks occurred between two or more observations involving both groups, the values of Wx as well as Wy are affected. Hence, equation 2-4 for the variance will be modified for correction of ties as

(Eq. 2-6)

Using the correction factor, Equation (2-5) is modified as

(Eq. 2-7)

SAQ 2-1

  1. A random sample of ten senior students in one section were given a test on reading comprehension with the following results: 84, 83, 76, 93, 88, 86, 75, 81, 79, 85. A random sample of eight senior students in another section from the same school were also given the same test with the following results: 89, 77, 92, 94, 87, 91, 78, 80. Is the difference between the two groups statistically significant? Use Wilcoxon-Mann-Whitney test at =0.05.

Wilcoxon Signed-Ranks Test

A. Function

The sign test utilize only the plus and the minus signs to indicate the differences between the observations and in a one-tailed sample test, or the plus and the minus signs of the differences between the pairs of observations in the paired sample case, but it does not take into consideration the magnitude of the differences. In 1945, Frank Wilcoxon proposed a more powerful test that utilizes both the magnitude and direction of difference such that it gives more weight to a pair that shows a large difference between the two conditions than to a pair that shows a large difference between the two conditions than to a pair that shows a small difference. This test was named after him as Wilcoxon signed ranks test and it is often referred to as Wilcoxon test for paired observations.

B. Method

Let di be the difference score for any matched pair, representing the difference between the pairs scores under two treatments, x and y. That is

Using Wilcoxon signed ranks test for hypothesis testing that for a continuous symmetrical population or for two continuous symmetrical population, first disregard all differences equal to zero and rank all of the di regardless of the sign; assign the rank of 1 to the smallest , the rank of 2 to the next smallest and so on. When the absolute value of two or more differences is the same, assign to each the average of the ranks that would have been assigned if the differences were distinguishable. For example, if the 3rd and the 4th smallest differences are equal in absolute value, each would be assigned a rank of 3.5. If the 5th, 6th and 7th smallest differences are equal in absolute value, each would be assigned a rank of 6.0. Then after this procedure, affix the sign of the difference to each rank. That is, indicate which ranks arose from positive di’s.

(Eq. 2-2)

To develop a test, let us define two statistics:

T+ = the sum of all ranks where differences > 0

T- = the sum of all ranks where differences < 0

and we shall designate the smaller of the T+ and T- as T.

The null hypothesis in this test is that treatments x and y are equivalent, i.e., they are samples from population with the same median and of almost the same continuous distribution. If Ho is true, then T+ = T-. But if the treatment x is very much different from treatment y, we would expect that the sum of the positive ranks is very much different from the sum of the negative ranks, and thus, we would reject Ho. The null hypothesis is rejected if the calculated value for T+ T- critical.

Occasionally, the two scores of any pair are equal. That is, no difference between the two treatments is observed for the pair, so that xi – yi = di = 0. Such pairs are dropped from the analysis and the sample size is reduced accordingly.

For small samples, Appendix Table B may be used for both one-tailed and two-tailed tests. A one-tailed test is used if the researcher has already predicted in advance the direction of the difference. For a two-tailed, double the table entry.

For sample 15, Appendix Table B cannot be used. The sum of the ranks, T+, is approximately normally distributed with

Mean = (Eq. 2-3)

and

Variance = (Eq. 2-4)

Thus

(Eq. 2-5)

is approximately normally distributed with zero mean and unit variance. Thus, Appendix Table A may be used. The approximation does improve as the sample size increases.

If there are tied ranks, then it is necessary to adjust for the test statistics to account for the decrease in the variability of T. This correction involves counting the number of groupings with tied ranks and the number of tied ranks within the group and thus the variance of T is reduced according to the equation,

(Eq. 2-6)

where g = no. of groupings with tied ranks

tj = no. of tied ranks in grouping j

Thus, the correction equation for variance when there are tied ranks will always increase the value of z. It is possible if Ho is rejected without the correction, it will be rejected with the correction. Furthermore, even if the correction equation is used when there are no tied ranks, it will not change the variance of T.

C. An Illustrative Example

Example 2-2

The Acton Paper Company gives new employees a test for mathematics anxiety. The test is given twice: once before and once after an intensive program in which required mathematical skills are identified and the company’s hiring and firing policies are discussed. Sample scores from the math anxiety test are given below. Test the claim that the program has no effect on the anxiety level using Wilcoxon signed ranks test at .

Employee / After Program / Before Program / d / Rank of d
1
2
3
4
5
6
7
8
9
10
11
12
13 / 104
97
60
88
39
82
91
87
41
43
82
58
67 / 83
64
58
72
40
70
87
79
25
43
64
40
52 / 19
33
2
16
-1
8
4
8
16
0
18
18
15 / 11
12
2
7.5
-1
4.5
3
4.5
7.5
---
9.5
9.5
6

Solution:

Applying the 6-step model of hypothesis testing, we obtain

Step 1. Stating the null hypothesis and alternative hypothesis

Ho: The program has no effect on the mathematics anxiety level of employees, In terms of the Wilcoxon signed ranks test, the sum of the positive ranks equals the sum of the negative ranks.

T+=T-

Ha: The program has an effect on the mathematics anxiety level of employees or the sum of the positive ranks differs the sum of the negative ranks.

T+T-

Step 2. Choosing the statistical test

The Wilcoxon signed ranks test is chosen because the study involves observations of two related samples and it yields difference scores that may be ranked according to the magnitude of their differences.

Step 3. Significance level and sample size

Let and N be the number of pairs less the number of pair(s) whose d=0. In this case, N=12.

Step 4. Sampling distribution and region of rejection

Appendix Table B gives the upper-tailed probability values from the sampling distribution for for .

Step 5. Computing the test statistics

After computing the signed difference between the two variables for each pair of observations, there are only 12 cases with with one case with , hence, N=12. The nest step is to rank the ’s without respect to sign. Use Equation 2-9 for tied d’s. Tabulate your results.

Then compute the sum of the positive ranks as T+ and the sum of the negative ranks as T-.

T- = 1

T+ = 11 + 12 + 2 + 7.5 + 4.5 + 3 + 4.5 + 7.5 + 9.5 + 9.5 + 6

= 77

C = 77

Appendix Table B shows that when N=12 and T+ = 77, we may reject Ho at for a one-tailed test when the tabled probability is 0.0005 and 2 x 0.0005 = 0.0010 for a two-tailed test. Hence, in the Wilcoxon signed ranks test the null hypothesis will be rejected if the tabled probability is less than or equal to the level of significance .

Step 6. Decision

Since the tabled probability for N=12 and C=77 is 0.0010 for a two-tailed test, and 0.0010 < 0.05 (p < 0.05), we may therefore conclude that Ho is rejected in favor of Ha in this study. This means that the program has an effect on the mathematics anxiety level of employees.

SAQ 2-2

Table 2-2 consists of sample data obtained when 14 persons are tested for reaction times with their left and right hands. (Only right-handed subjects were used.) Use the Wilcoxon signed-ranks test to test the claim of no difference between reaction times with right and left hands. Use a significance level of .