1 2 The Wilcoxon Signed Rank Test 22S 30 105 Statistical Methods and Computing for single sample or paired samples useful when the population distribution is not normal and the sample size is not large More Nonparametric Methods of the within pair differences in paired sample case or of individual values in single sample case Lecture 25 April 27 2011 makes use of the magnitudes of the differences as well as their signs Kate Cowles 374 SH 335 0727 kcowles stat uiowa edu 3 Example Kashima Baker and Landen 1988 studied whether media based instruction could help the parents of mentally handicapped children become more effective at teaching their children self help skills As part of the study 17 families participated in a training program Before and after the training program the primary parent took the Behavioral Vignettes test which assesses knowledge of behavioral modification principles A higher score indicates greater knowledge 4 The following are the pre and post test training scores for 12 of their families Pre 7 6 10 16 8 13 8 14 16 11 12 13 Post 11 14 16 17 9 15 9 17 20 12 14 15 May we conclude from these data that the training program increases knowledge of behavior modification principles We will test at the 01 level 5 6 Hypotheses of the Wilcoxon Signed Rank Test Steps in the Wilcoxon signed rank procedure The null hypothesis is that in the underlying population of differences among pairs the median difference is equal to 0 1 Select a random sample of n pairs of observations 2 Compute the difference di in each pair of observations Delete all pairs in which di 0 and reduce n accordingly H0 Md 0 The alternative hypothesis may be one or two sided 3 Ignoring the signs of the dis rank their absolute values from smallest to largest When there are ties in absolute values assign each tied value the mean of the rank positions the tied values occupy Ha Md 0 Ha Md 0 Ha Md 6 0 4 Assign to each rank the sign of the di that yields that rank If we define our differences as post pre then our alternative would be Ha Md 0 7 5 Find T the sum of the ranks with positive signs and T the sum of the ranks with negative signs 6 Let the test statistic T equal the smaller of T and T 8 Pre and Post Test example Pre 7 6 10 17 8 13 8 14 16 11 12 13 Post d i 11 4 14 8 16 6 16 1 9 1 15 2 9 1 17 3 20 4 12 1 14 2 15 2 Rank 9 5 12 11 2 5 2 5 6 2 5 8 9 5 2 5 6 6 The sum of the negative ranks is T 2 5 9 SAS for the Wilcoxon Signed Rank Test carried out automatically by proc univariate SAS computes a slightly different form of the test statistic n n 1 X S positive ranks 4 recalling that n is the number of differences whose value is not equal to 0 computes p value in two different ways depending on sample size if n 20 p value is computed from each distribution of S which can be enumerated under null hypothesis that distribution is symmetric around 0 when n 20 approximate S is compared to approximate t distribution 11 10 data whatever input pre post diff post pre datalines 7 11 6 14 10 16 16 17 8 9 13 15 8 9 14 17 16 20 11 12 12 14 13 15 run 12 Interpreting the results proc univariate var diff run Recall that we wanted to determine whether the audiovisual instruction improved parent s test scores The UNIVARIATE Procedure Variable diff Tests for Location Mu0 0 Test Statistic p Value Student s t Sign Signed Rank t M S Pr t Pr M Pr S 4 521908 6 39 0 0009 0 0005 0 0005 Note For a 1 sided p value we would divide the 2 sided p value by 2 The null and alternative hypotheses regarding the median difference that is the median of post pre are H0 Md 0 Ha Md 0 Can we reject H0 at the 01 significance level What does this mean with respect to the research question 13 Sign Test in SAS 14 The Wilcoxon Rank Sum Test Note that proc univariate also automatically carries out the sign test its version of sign test statistic is n n M 2 use sign test if sample size is small and it is unreasonable to assume that population distribution is symmetric used to compare nonparametrically two samples that have been drawn from independent populations nonparametric analog of two independentsample t test also called Mann Whitney test MannWhitney U test and Mann Whitney Wilcoxon test sign test p value will often be a little larger than that of the Wilcoxon signed rank test not so in this case 15 16 Assumptions of the Wilcoxon Rank Sum Test Example a question in pharmacokinetics Two samples of sizes n and m have been drawn independently and randomly from their respective populations Is total plasma clearance of cefpiramide different in healthy people vs patients with alcoholic cirrhosis The measurement scale is at least ordinal The variable of interest is continuous If the populations differ they differ only with respect to their medians i e otherwise their shapes are approximately the same Demotes Mainard et al 1991 measured total plasma clearance ml min following a single 1 gram intravenous injection of cefpiramide in 10 healthy volunteers and 10 patients with alcoholic cirrhosis 17 Case number 1 0 000 2 0 000 3 0 000 4 0 000 5 0 000 6 0 000 7 0 000 8 0 000 9 0 000 10 0 000 11 1 000 12 1 000 13 1 000 14 1 000 15 1 000 16 1 000 17 1 000 18 1 000 19 1 000 20 1 000 18 Hypotheses for the Wilcoxon Rank Sum Test CIRR CLEAR 21 700 29 300 25 300 22 800 21 300 31 200 29 200 28 700 17 200 25 700 14 600 18 100 12 300 8 800 10 300 8 500 29 300 8 100 6 900 7 900 H0 M1 M2 The alternative hypothesis may be one or two sided H a M 1 M2 H a M 1 M2 Ha M1 6 M2 Can we conclude at the 01 significance level that median clearance rate is different in healthy patients vs those with alcoholic cirrhosis 19 Procedure for the Wilcoxon Rank Sum Test Combine the two samples into one large group and sort values from smallest to largest Rank the values When there are ties in absolute values assign each tied value the mean of the rank positions the tied values occupy Sum the ranks within each original sample The test statistic is W the smaller of the two sums 20 Ranked values for clearance example Case number CIRR CLEAR 1 0 000 21 700 2 0 000 29 300 3 0 …
View Full Document