Wilcoxon Matched-Pairs Signed Ranks Test
© 1998 by Dr. Thomas W. MacFarland -- All Rights Reserved
************ wilcoxon.doc ************ Background: The Wilcoxon Matched-Pairs Ranks test is a non- parametric test that is often regarded as being similar to a matched pairs t-test. The Wilcoxon Matched-Pairs Ranks test is used to determine differences between groups of paired data when the data do not meet the rigor associated with a parametric test. Unlike less robust nonparametric tests such as the sign test: -- The Wilcoxon test is used to determine the magnitude of difference between matched groups. -- The Wilcoxon test is used to determine more than only the direction of difference. Scenario: This file examines if separating students who previously worked on programming assignments as a pair has any impact on project quality when: -- One member of the pair is required to work on their own, -- And the other member of the pair is assigned a new programming partner. Dr. Kieta teaches Cobol I and Cobol II at a local community college. There are 60 students in Cobol I, with instruction offered in a laboratory- type classroom setting with only 30 computers. Logically, Dr. Kieta used random assignment to segregate the 60 students into 30 sets of paired students. During the 10-day break between Cobol I and Cobol II, more computers are brought into the classroom. Further, many of the students who enrolled in Cobol I immediately enrolled for Dr. Kieta's class in Cobol II. Seeing an opportunity for a research project on group vs. individual work with the introduction of these new computers, Dr. Kieta makes new assignments: -- 20 students who were enrolled in Cobol I, working with an assigned partner, now have the chance to work on their own in Cobol II -- their counterparts from Cobol I are now assigned a new partner for Cobol II This test will determine if there are differences in the Cobol II final examination among these 40 Cobol I and Cobol II students. A summary of the study is presented in Table 1. Table 1 Final Exam Scores in Cobol II of Students Who Were Previously Paired Together in Cobol I =================================================== Exam Score for Previously Paired Students ---------------------------------------- Pair Member: Pair Member: Worked on Own Worked With a New Pair in Cobol II Partner in Cobol II --------------------------------------------------- 01 090 083 02 084 089 03 078 058 04 079 093 05 065 049 06 049 082 07 092 093 08 071 100 09 085 083 10 076 055 11 068 065 12 071 083 13 088 081 14 089 088 15 076 083 16 061 078 17 088 088 18 058 080 19 073 070 20 082 083 _______________________________________________________ Ho: Null Hypothesis: There is no difference in final examination test scores in Cobol II between students who were previously paired together in Cobol I, with the pairs now redesigned so that one student in Cobol II now works on their own and their matched counterpart now works with another student in Cobol II (p <= .05). Files: 1. wilcoxon.doc 2. wilcoxon.dat 3. wilcoxon.r01 4. wilcoxon.o01 5. wilcoxon.con 6. wilcoxon.lis Command: At the Unix prompt (%), key: %spss -m < wilcoxon.r01 > wilcoxon.o01 ************ wilcoxon.dat ************ 01 090 083 02 084 089 03 078 058 04 079 093 05 065 049 06 049 082 07 092 093 08 071 100 09 085 083 10 076 055 11 068 065 12 071 083 13 088 081 14 089 088 15 076 083 16 061 078 17 088 088 18 058 080 19 073 070 20 082 083 ************ wilcoxon.r01 ************ SET WIDTH = 80 SET LENGTH = NONE SET CASE = UPLOW SET HEADER = NO TITLE = Wilcoxon Matched Pairs Signed Ranks Test COMMENT = This file examines if separating students who previously worked on programming assignments as a pair has any impact on project quality when: one member of the pair is required to work on their own and the other member of the pair is assigned a new programming partner. Dr. Kieta teaches Cobol I and Cobol II at a local community college. There are 60 students in Cobol I, with instruction offered in a laboratory- type classroom setting with only 30 computers. Logically, Dr. Kieta used random assignment to segregate the 60 students into 30 sets of paired students. During the 10-day break between Cobol I and Cobol II more computers are brought into the classroom. Further, many of the students who enrolled in Cobol I immediately enrolled for Dr. Kieta's class in Cobol II. Seeing an opportunity for a research project on group vs. individual work with the introduction of these new computers, Dr. Kieta makes new assignments: -- 20 students who were enrolled in Cobol I, working with an assigned partner, now have the chance to work on their own in Cobol II -- their counterparts from Cobol I are now assigned a new partner for Cobol II This test will determine if there are differences in the Cobol II final examination among these 40 Cobol I and Cobol II students. DATA LIST FILE = 'wilcoxon.dat' FIXED / Pair 20-21 Wk_Own 34-36 Wk_New 49-51 Variable Labels Pair "Pair Number" / Wk_Own "Exam Score: Student Who Worked on Their Own" / Wk_New "Exam Score: Student Assigned a New Partner" NPAR TESTS WILCOXON = Wk_Own WITH Wk_New ************ wilcoxon.o01 ************ 1 SET WIDTH = 80 2 SET LENGTH = NONE 3 SET CASE = UPLOW 4 SET HEADER = NO 5 TITLE = Wilcoxon Matched Pairs Signed Ranks Test 6 COMMENT = This file examines if separating students who 7 previously worked on programming assignments 8 as a pair has any impact on project quality 9 when: one member of the pair is required to 10 work on their own and the other member of the 11 pair is assigned a new programming partner. 12 13 Dr. Kieta teaches Cobol I and Cobol II at a 14 local community college. There are 60 students in 15 Cobol I, with instruction offered in a laboratory- 16 type classroom setting with only 30 computers. 17 Logically, Dr. Kieta used random assignment to 18 segregate the 60 students into 30 sets of paired 19 students. 20 21 During the 10-day break between Cobol I and Cobol 22 II more computers are brought into the classroom. 23 Further, many of the students who enrolled in 24 Cobol I immediately enrolled for Dr. Kieta's 25 class in Cobol II. 26 27 Seeing an opportunity for a research project on 28 group vs. individual work with the introduction of 29 these new computers, Dr. Kieta makes new assignments: 30 31 -- 20 students who were enrolled in Cobol I, working 32 with an assigned partner, now have the chance to 33 work on their own in Cobol II 34 35 -- their counterparts from Cobol I are now assigned 36 a new partner for Cobol II 37 38 This test will determine if there are differences 39 in the Cobol II final examination among these 40 40 Cobol I and Cobol II students. 41 42 DATA LIST FILE = 'wilcoxon.dat' FIXED 43 / Pair 20-21 44 Wk_Own 34-36 45 Wk_New 49-51 46 This command will read 1 records from wilcoxon.dat Variable Rec Start End Format PAIR 1 20 21 F2.0 WK_OWN 1 34 36 F3.0 WK_NEW 1 49 51 F3.0 47 Variable Labels 48 Pair "Pair Number" 49 / Wk_Own "Exam Score: Student Who Worked on Their Own" 50 / Wk_New "Exam Score: Student Assigned a New Partner" 51 52 NPAR TESTS WILCOXON = Wk_Own WITH Wk_New ***** Workspace allows for 18724 cases for NPAR tests ***** - - - - - Wilcoxon Matched-Pairs Signed-Ranks Test WK_OWN Exam Score: Student Who Worked on Their with WK_NEW Exam Score: Student Assigned a New Part Mean Rank Cases 8.78 9 - Ranks (WK_NEW LT WK_OWN) 11.10 10 + Ranks (WK_NEW GT WK_OWN) 1 Ties (WK_NEW EQ WK_OWN) -- 20 Total Z = -.6439 2-Tailed P = .5197 ************ wilcoxon.con ************ Outcome: It is certainly possible to determine the status of the Null Hypothesis by comparing the calculated z statistic against the criterion z statistic: z = |-0.644| (p = .520) z |-0.644| < |-1.960| (criterion z with alpha = .05) Note. The | and | characters are used to indicate absolute value. The null hypothesis is accepted at p <= .05. Any differences in final examination scores in Cobol II between students who were previously paired in Cobol I are due to chance. Of course, you can also observe that the calculated p value of .5197 exceeded the declared p value of .05 to determine the probability level of difference. Conclusion: In further analysis of the output file and the "practical" significance of p values: 1. There were nine cases where students who were assigned to a new partner had lower final exam scores in Cobol II than their original partner in Cobol I. 8.78 9 - Ranks (WK_NEW LT WK_OWN) 11.10 10 + Ranks (WK_NEW GT WK_OWN) 1 Ties (WK_NEW EQ WK_OWN) 2. There were ten cases where students who were assigned to a new partner had higher final exam scores in Cobol II than their original partner in Cobol I. 3. There was one case where scores between the two original partners from Cobol I were the same in Cobol II. With final examination scores all over the range, such as what you see here, it would be surprising if differences between the two groups were due to anything but chance. ************ wilcoxon.lis ************ % minitab MTB > outfile 'wilcoxon.lis' Collecting Minitab session in file: wilcoxon.lis MTB > # MINITAB addendum for wilcoxon.dat MTB > read 'wilcoxon.dat' c1 c2 c3 Entering data from file: wilcoxon.dat 20 rows read. MTB > print c1 c2 c3 ROW C1 C2 C3 1 1 90 83 2 2 84 89 3 3 78 58 4 4 79 93 5 5 65 49 6 6 49 82 7 7 92 93 8 8 71 100 9 9 85 83 10 10 76 55 11 11 68 65 12 12 71 83 13 13 88 81 14 14 89 88 15 15 76 83 16 16 61 78 17 17 88 88 18 18 58 80 Continue? y 19 19 73 70 20 20 82 83 MTB > describe c2 c3 N MEAN MEDIAN TRMEAN STDEV SEMEAN C2 20 76.15 77.00 76.78 11.75 2.63 C3 20 79.20 83.00 79.72 13.34 2.98 MIN MAX Q1 Q3 C2 49.00 92.00 68.75 87.25 C3 49.00 100.00 72.00 88.00 MTB > winterval c2 c3 ESTIMATED ACHIEVED N MEDIAN CONFIDENCE CONFIDENCE INTERVAL C2 20 76.7 95.0 ( 70.5, 82.0) C3 20 81.5 95.0 ( 73.0, 85.5) MTB > mann-whitney c2 c3 Mann-Whitney Confidence Interval and Test C2 N = 20 Median = 77.00 C3 N = 20 Median = 83.00 Point estimate for ETA1-ETA2 is -4.00 95.0 pct c.i. for ETA1-ETA2 is (-12.00,5.00) W = 377.0 Test of ETA1 = ETA2 vs. ETA1 n.e. ETA2 is significant at 0.3793 The test is significant at 0.3785 (adjusted for ties) Cannot reject at alpha = 0.05 -------------------------- Disclaimer: All care was used to prepare the information in this tutorial. Even so, the author does not and cannot guarantee the accuracy of this information. The author disclaims any and all injury that may come about from the use of this tutorial. As always, students and all others should check with their advisor(s) and/or other appropriate professionals for any and all assistance on research design, analysis, selected levels of significance, and interpretation of output file(s). The author is entitled to exclusive distribution of this tutorial. Readers have permission to print this tutorial for individual use, provided that the copyright statement appears and that there is no redistribution of this tutorial without permission. Prepared 980316 Revised 980914 end-of-file 'wilcoxon.ssi'