EPI 809 / Spring 2008 Wilcoxon Signed Rank Test
EPI 809 / Spring 2008 Signed Rank Test Example You work in the finance department. Is the new financial package faster (.05 level)? You collect the following data entry times: UserCurrentNew Donna Santosha Sam Tamika Brian Jorge © T/Maker Co.
EPI 809 / Spring 2008 Wilcoxon Signed Rank Test 1.Tests Probability Distributions of 2 Related Populations 2.Corresponds to t-test for Dependent (Paired) Means 3.Assumptions Random samples; Both populations are continuous; paired samples. Random samples; Both populations are continuous; paired samples. Can Use Normal Approximation if #(non-zero differences) 16 if #(non-zero differences) 16
EPI 809 / Spring 2008 Signed Rank Test Procedure 1. Obtain Difference Scores, D i = X 1i - X 2i 2. Take Absolute Value |D i | and rank them (Do not count D i = 0) 3. Assign Ranks, R i, with Smallest = 1 4. Calculate range and mean rank for |D i | 5. Sum ‘+’ Ranks (T + ) & ‘-’ Ranks (T - ) 6. Statistic (T + ). mean = n(n+1)/4, var = n(n+1)(2n+1)/24 if no ties. var = n(n+1)(2n+1)/24 if no ties.
EPI 809 / Spring 2008 Signed Rank Test Procedure Table method for (n < 16). Use Table 11 that provides the critical values at significant level. Use Table 11 that provides the critical values at significant level. 2. If n ≥ 16, use normal approximation. Let T 0 = n(n+1)/4, If T + =T 0, then T = 0 Let T 0 = n(n+1)/4, If T + =T 0, then T = 0 Otherwise, if no ties, Otherwise, if no ties, If ties, t i =R i If ties, t i =R i of ties.
EPI 809 / Spring 2008 Signed Rank Test Procedure (continued) If T > Z 1- α/2 then reject H 0. Otherwise accept H 0. P – value: p = 2 [1 - Φ(T)]. Condition: number of nonzero differences > 15.
EPI 809 / Spring 2008 Signed Rank Test Example Skin care treatments A vs B 1. Each subject received two treatments A and B randomly applied to left and right arms. 2. Measure redness after sunlight exposure of 10 min. 3. Data: subject 1: X 1A, X 1B subject 2: X 2A, X 2B.….…
EPI 809 / Spring 2008 Signed Rank Test Computation Illustration |di|di (-)fi (-)di(+)fi(+) k (# subj) Range (Rank) Mean Rank
EPI 809 / Spring 2008 Testing with positive statistic T + T + = 10* * *28 = 248 E(T + ) = 40*(40+1)/4 = 410 Var = 40*(40+1)*(80+1)/24 – [( ) + ( ) + (7 3 -7) +…+ (1 3 -1)]/48 = T = {|248-10|-.5}/√ = 2.19 P = 2*[1- Φ(2.19)] =
EPI 809 / Spring 2008 Signed Rank Test Example You work in the finance department. Is the new financial package faster (.05 level)? You collect the following data entry times: UserCurrentNew Donna Santosha Sam Tamika Brian Jorge © T/Maker Co.
EPI 809 / Spring 2008 Signed Rank Test Computation Table
EPI 809 / Spring 2008 Signed Rank Test Solution H 0 : Identical Distrib. H a : Current Shifted Right =.05 (one-sided) n’ = 5 (not 6; 1 elim.) Critical Value(s): Test Statistic: Decision:Conclusion: Reject Do Not Reject TuTuTuTu TLTLTLTL
EPI 809 / Spring 2008 Wilcoxon Signed Rank Table (Portion)
EPI 809 / Spring 2008 Signed Rank Test Solution H 0 : Identical Distrib. H a : Current Shifted Right =.05 (one-sided) n’ = 5 (not 6; 1 elim.) Critical Value(s): Test Statistic: Decision:Conclusion: Do Not Reject 015
EPI 809 / Spring 2008 Signed Rank Test Solution H 0 : Identical Distrib. H a : Current Shifted Right =.05 (one-sided) n’ = 5 (not 6; 1 elim.) Critical Value(s): Test Statistic: Decision:Conclusion: Do Not Reject 015 Since one-sided Test & Current Shifted Right, Use T +
EPI 809 / Spring 2008 Signed Rank Test Solution H 0 : Identical Distrib. H a : Current Shifted Right =.05 (one-sided) n’ = 5 (not 6; 1 elim.) Critical Value(s): Test Statistic: Conclusion: Border line at =.05 Do Not Reject 015 Since One-sided Test & Current Shifted Right, Use T + T + = 15
EPI 809 / Spring 2008 Kruskal-Wallis test A k-sample non-parametric test on the means (k > 2). Pool observations together N = ∑n i and assign ranks to individuals. Compute the rank sum R i for each sample. Test statistic Chi-squares with df = (k-1) one tail prob. Compare with χ 2 k-1, 1-α Should only be used if smallest n i ≥ 5.
EPI 809 / Spring 2008 Kruskal-Wallis test statistic If no ties. If ties. Denote t i, g as before.
EPI 809 / Spring 2008 Conclusion 1. Distinguished Parametric & Nonparametric Test Procedures 2. Explained a Variety of Nonparametric Test Procedures 3. Solved Hypothesis Testing Problems Using Nonparametric Tests
EPI 809 / Spring 2008 Summary NonparametricParametric Sign Rank testOne sample t-test Wilcoxon Rank – Sum test (Mann-Whitney U test) Two sample t-test Wilcoxon Signed-Rank testTwo paired sample t-test Kruskal-Wallis testMultiple sample test.