Business Statistics: A Decision-Making Approach 6th Edition Chapter 16 Introduction to Nonparametric Statistics Business Statistics: A Decision-Making Approach, 6e © 2010 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 the Kruskal-Wallis one-way ANOVA Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, 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 Decision-Making Approach, 6e © 2010 PrenticeHall, 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 Decision-Making Approach, 6e © 2010 PrenticeHall, 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 Decision-Making Approach, 6e © 2010 PrenticeHall, 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 Decision-Making Approach, 6e © 2010 PrenticeHall, 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 Decision-Making Approach, 6e © 2010 PrenticeHall, 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 Decision-Making Approach, 6e © 2010 PrenticeHall, 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 61 95 -17 -6 38 -6 26 21 55 Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, Inc | 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 Decision-Making Approach, 6e © 2010 PrenticeHall, 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 Since T Tα, not reject H0 Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, 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 Decision-Making Approach, 6e © 2010 PrenticeHall, 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 where n is the number of paired values Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, Inc Chap 16-41 Mann-Whitney U-Test for Large Samples (continued) Normal approximation for the Wilcoxon T Test Statistic: z= n(n + 1) T− n(n + 1)(2n + 1) 24 Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, 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 others Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, 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 Decision-Making Approach, 6e © 2010 PrenticeHall, 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) i=1 ni where: N = Sum of sample sizes in all samples k = Number of samples Ri = Sum of ranks in the ith sample ni = Size of the ith sample Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, Inc Chap 16-45 Kruskal-Wallis Test Procedure (continued) Complete the test by comparing the calculated H value to a critical χ value from the chi-square distribution with k – degrees of freedom (The chi-square distribution is Appendix G) Decision rule Reject H0 if test statistic H > χ2α Otherwise not reject H0 Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, 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 Decision-Making Approach, 6e © 2010 PrenticeHall, 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 55 60 72 45 70 Σ = 44 Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, 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) i=1 ni 44 56 20 12 − 3(15 + 1) = 6.72 = + + 15(15 + 1) 5 Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, 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 < not reject H0 χ.205 = 9.4877 There is not sufficient evidence to reject that the population medians are all equal Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, 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 Correction for tied rankings: g 1− ( t ∑ i − ti ) i=1 N3 − N where: g = Number of different groups of ties ti = Number of tied observations in the ith tied group of scores N = Total number of observations Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, Inc Chap 16-51 H Statistic Corrected for Tied Rankings Corrected H statistic: i k H= 12 R − 3(N + 1) ∑ N(N + 1) i=1 ni g 1− ( t ∑ i − ti ) i=1 N −N Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, Inc Chap 16-52 Chapter Summary Developed and applied the Wilcoxon signed rank Wtest for a population median Developed and applied the Mann-Whitney U-test for two population medians Small Samples Large Sample z approximation Used the Wilcoxon Matched-Pairs T-test for paired samples Small Samples Large sample z approximation Small Samples Large sample z approximation Applied the Kruskal-Wallis H-test for multiple population medians Business Statistics: A Decision-Making Approach, 6e © 2010 PrenticeHall, Inc Chap 16-53 ... and 20 The U statistic approaches a normal distribution as sample sizes increase If samples are larger than 20, a normal approximation can be used Business Statistics: A Decision- Making Approach, ... ANOVA Business Statistics: A Decision- Making Approach, 6e © 2010 PrenticeHall, Inc Chap 16-2 Nonparametric Statistics Nonparametric Statistics Fewer restrictive assumptions about data levels... 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 Decision- Making