Business Statistics: A Decision-Making Approach 6th Edition Chapter 16 Introduction to Nonparametric Statistics Business Statistics: A Decision-Making Approach, 6e © 2005 PrenticeHall, Inc Chap 16-1 Chapter Goals After completing this chapter, you should be able to: Recognize when and how to use the Wilcoxon signed rank test for a population median Recognize the situations for which the Wilcoxon signed rank test applies and be able to use it for decision-making Know when and how to perform a Mann-Whitney U-test Perform nonparametric analysis of variance using Business Statistics: A DecisionMaking Approach, 6e © 2005one-way ANOVA the Kruskal-Wallis Prentice-Hall, Inc Chap 16-2 Nonparametric Statistics Nonparametric Statistics Fewer restrictive assumptions about data levels and underlying probability distributions Population distributions may be skewed The level of data measurement may only be ordinal or nominal Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-3 Wilcoxon Signed Rank Test Used to test a hypothesis about one population median the median is the midpoint of the distribution: 50% below, 50% above A hypothesized median is rejected if sample results vary too much from expectations no highly restrictive assumptions about the shape of the population distribution are needed Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-4 The W Test Statistic Performing the Wilcoxon Signed Rank Test Calculate the test statistic W using these steps: Step 1: collect sample data Step 2: compute di = difference between each value and the hypothesized median Step 3: convert di values to absolute differences Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-5 The W Test Statistic (continued) Performing the Wilcoxon Signed Rank Test Step 4: determine the ranks for each di value eliminate zero di values Lowest di value = For ties, assign each the average rank of the tied observations Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-6 The W Test Statistic (continued) Performing the Wilcoxon Signed Rank Test Step 5: Create R+ and R- columns for data values greater than the hypothesized median, put the rank in an R+ column for data values less than the hypothesized median, put the rank in an R- column Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-7 The W Test Statistic (continued) Performing the Wilcoxon Signed Rank Test Step 6: the test statistic W is the sum of the ranks in the R+ column Test the hypothesis by comparing the calculated W to the critical value from the table in appendix P Note that n = the number of non-zero di values Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-8 Example The median class size is claimed to be 40 Sample data for classes is randomly obtained Compare each value to the hypothesized median to find difference Class Difference size = xi di = xi – 40 23 45 34 78 34 66 Business Statistics: A Decision61 Making Approach, 6e ©952005 Prentice-Hall, Inc -17 -6 38 -6 26 21 55 | di | 17 38 26 21 55 Chap 16-9 Example (continued) Rank the absolute differences: tied | di | Rank 6 17 21 26 38 55 2.5 2.5 Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-10 Small Sample Example (continued) The calculated T value is T = 13 Complete the test by comparing the calculated T value to the critical T-value from Appendix N For n = and = 025 for a one-tailed test, T = T = 13 reject H0 T = not reject H0 Business Statistics: A DecisionSince T T, not reject H0 Making Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-39 Wilcoxon Matched Pairs Test for Large Samples The table in Appendix N includes T values only for sample sizes from to 25 The T statistic approaches a normal distribution as sample size increases If the number of paired values is larger than 25, a normal approximation can be used Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-40 Wilcoxon Matched Pairs Test for Large Samples (continued) The mean and standard deviation for Wilcoxon T : n(n 1) (n)(n 1)(2n 1) 24 Business Statistics: A DecisionMaking Approach, 6e © 2005 where n is the number of paired values Prentice-Hall, Inc Chap 16-41 Mann-Whitney U-Test for Large Samples (continued) Normal approximation for the Wilcoxon T Test Statistic: n(n 1) T z n(n 1)(2n 1) 24 Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-42 Kruskal-Wallis One-Way ANOVA Tests the equality of more than population medians Assumptions: variables have a continuous distribution the data are at least ordinal samples are independent samples come from populations whose only possible difference is that at least one may have a different central location than the Business Statistics: A Decisionothers Making Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-43 Kruskal-Wallis Test Procedure Obtain relative rankings for each value In event of tie, each of the tied values gets the average rank Sum the rankings for data from each of the k groups Compute the H test statistic Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-44 Kruskal-Wallis Test Procedure (continued) The Kruskal-Wallis H test statistic: (with k – degrees of freedom) k i 12 R H 3(N 1) N(N 1) i1 ni where: N = Sum of sample sizes in all samples k = Number of samples Ri = Sum of ranks in the ith sample Business Statistics: A ni Decision= Size of the ith sample Making Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-45 Kruskal-Wallis Test Procedure (continued) Complete the test by comparing the calculated H value to a critical 2 value from the chi-square distribution with k – degrees of freedom (The chi-square distribution is Appendix G) Decision rule Reject H if test statistic H > 2 Otherwise not reject H Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-46 Kruskal-Wallis Example Do different departments have different class sizes? Class size (Math, M) Class size (English, E) Class size (History, H) 23 45 54 78 66 55 60 72 45 70 30 40 18 34 44 Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-47 Kruskal-Wallis Example Do different departments have different class sizes? Class size Class size Ranking Ranking (Math, M) (English, E) 23 41 54 78 66 15 12 = 44 55 60 72 45 70 Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc 10 11 14 13 = 56 Class size (History, H) Ranking 30 40 18 34 44 = 20 Chap 16-48 Kruskal-Wallis Example (continued) H0 : MedianM MedianE MedianH HA : Not all population Medians are equal The H statistic is k 12 Ri2 H 3(N 1) N(N 1) i1 ni 44 56 20 12 3(15 1) 6.72 Business Statistics: 15(15 A1Decision) 5 Making Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-49 Kruskal-Wallis Example (continued) Compare H = 6.72 to the critical value from the chi-square distribution for – = degrees of freedom and = 05: 05 9.4877 Since H = 6.72 < 05 9.4877 not reject H0 Business Statistics: A DecisionThere is not sufficient evidence to reject Making Approach, 6e ©population 2005 that the medians are all equal Prentice-Hall, Inc Chap 16-50 Kruskal-Wallis Correction If tied rankings occur, give each observation the mean rank for which it is tied The H statistic is influenced by ties, and should be corrected g Correction for tied rankings: 1 ( t i ti ) i1 N3 N where: g = Number of different groups of ties Business Statistics: A Decisionti = Number of tied observations in the ith tied group of scores Making Approach, 6e ©number 2005 of observations N = Total Prentice-Hall, Inc Chap 16-51 H Statistic Corrected for Tied Rankings Corrected H statistic: i k H 12 R 3(N 1) N(N 1) i1 ni g 1 Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc ( t i ti ) i1 N N Chap 16-52 Chapter Summary Developed and applied the Wilcoxon signed rank W-test for a population median Developed and applied the Mann-Whitney U-test for two population medians Small Samples Large sample z approximation Small Samples Large Sample z approximation Used the Wilcoxon Matched-Pairs T-test for paired samples Small Samples Large sample z approximation Business Statistics: Decision Applied the A Kruskal-Wallis H-test for multiple population Makingmedians Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-53 ... when and how to perform a Mann-Whitney U-test Perform nonparametric analysis of variance using Business Statistics: A DecisionMaking Approach, 6e © 2005one-way ANOVA the Kruskal-Wallis Prentice-Hall,... Population distributions may be skewed The level of data measurement may only be ordinal or nominal Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-3 Wilcoxon... expectations no highly restrictive assumptions about the shape of the population distribution are needed Business Statistics: A DecisionMaking Approach, 6e © 2005 Prentice-Hall, Inc Chap 16-4 The W Test