Presentation on theme: "Prepared by Lloyd R. Jaisingh"— Presentation transcript:
1Prepared by Lloyd R. Jaisingh A PowerPoint Presentation Package to AccompanyApplied Statistics in Business & Economics, 4th edition David P. Doane and Lori E. SewardPrepared by Lloyd R. Jaisingh
2Nonparametric Tests Chapter 16 Chapter Contents 16.1 Why Use Nonparametric Tests?16.2 One-Sample Runs Test16.3 Wilcoxon Signed-Rank Test16.4 Wilcoxon Rank Sum16.5 Kruskal-Wallis Test for Independent Samples16.6 Friedman Test for Related Samples16.7 Spearman Rank Correlation Test
3Nonparametric Tests Chapter 16 Chapter Learning Objectives LO16-1: Define nonparametric tests and explain when they may be desirable.LO16-2: Use the one-sample runs test.LO16-3: Use the Wilcoxon signed-rank test.LO16-4: Use the Wilcoxon rank sum test for two samples.LO16-5: Use the Kruskal-Wallis test for c independent samples.LO16-6: Use the Friedman test for related samples.LO16-7: Use the Spearman rank correlation test.LO16-8: Use computer software to perform the tests and obtain p-values.
416.1 Why Use Nonparametric Tests? LO16-1Chapter 16LO16-1: Define nonparametric tests and explain when they may be desirable.Parametric TestsParametric hypothesis tests require the estimation of one or more unknown parameters (e.g., population mean or variance).Often, unrealistic assumptions are made about the normality of the underlying population.Large sample sizes are often required to invoke the Central Limit Theorem.Nonparametric TestsNonparametric or distribution-free tests- usually focus on the sign or rank of the data rather than the exact numerical value.- do not specify the shape of the parent population.- can often be used in smaller samples.- can be used for ordinal data.
516.1 Why Use Nonparametric Tests? LO16-1Chapter 16Advantages and Disadvantages of Nonparametric Tests
616.1 Why Use Nonparametric Tests? LO16-1Chapter 16Some Common Nonparametric Tests
7Wald-Wolfowitz Runs Test 16.2 One-Sample Runs TestLO16-2Chapter 16Wald-Wolfowitz Runs TestTo test the hypothesis of a random pattern in a sequence of binary events, first count the number of outcomes of each type. n1 = number of outcomes of the first type n2 = number of outcomes of the second type n = total sample size = n1 + n2A run is a series of consecutive outcomes of the same type, surrounded by a sequence of outcomes of the other type.When n1 ≥ 10 and n2 ≥ 10, then the number of runs R may be assumed to be normally distributed with mean mR and standard deviation sR.For a given level ofsignificance a, find thecritical value za/2 for atwo-tailed test.Reject the hypothesisof a random pattern ifz < -za/2 or if z > +za/2 .
816.3 Wilcoxon Signed-Rank Test LO16-3Chapter 16LO16-3: Use the Wilcoxon signed-rank test.To compare the sample median (M) with a benchmark median (M0), the hypotheses are:When evaluating the difference between paired observations, use the median difference (Md) and zero as the benchmark.Calculate the difference between the paired observations.Rank the differences from smallest to largest by absolute value.Add the ranks of the positive differences to obtain the rank sum W.
916.3 Wilcoxon Signed-Rank Test LO16-3Chapter 16For small samples, a special table is required to obtain critical values.For large samples (n ≥ 20), the test statistic is approximately normal.Use Excel or Appendix C to get a p-value.Reject H0 if p-value ≤ a.
1016.4 Wilcoxon Rank Sum Test (Mann Whitney Test) LO16-4Chapter 16LO16-4: Use the Wilcoxon rank sum test for two samples.Performing the TestThe hypotheses are H0: M1 = M2 (no difference in medians) H1: M1 ≠ M2 (medians differ)Step 1: Sort the combined samples from lowest to highest.Step 2: Assign a rank to each value.If values are tied, the average of the ranks is assigned to each.Step 3: The ranks are summed for each column (e.g., T1, T2).Step 4: The sum of the ranks T1 + T2 must be equal to n(n + 1)/2, where n = n1 + n2.Step 5: Calculate the mean rank sums – mean of T1 and mean of T2.Step 6: For large samples (n1 ≤ 10, n2 ≥ 10), use a z test.
1116.4 Wilcoxon Rank Sum Test (Mann Whitney Test) LO16-4Chapter 16Performing the TestStep 7: For a given a, reject H0 if z < -za/2 or z > +za/2
1216.5 Kruskal-Wallis Test for Independent Samples LO16-5Chapter 16Performing the TestThe hypotheses to be tested are: H0: All c population medians are the same H1: Not all the population medians are the sameFor a completely randomized design with c groups, the tests statistic isThe H test statistic follows a chi-square distribution with d.f. = c – 1 degrees of freedom.This is a right-tailed test, so reject H0 if H > c2a or if p-value ≤ a.
1316.6 Friedman Test for Related Samples LO16-6Chapter 16LO16-6: Use the Friedman test for related samples.The groups must be of the same size.Treatments should be randomly assigned within blocks.Data should be at least interval scale.
1416.6 Friedman Test for Related Samples LO16-6Chapter 16In addition to the c treatment levels that define the columns, the Friedman test also specifies r block factor levels to define each row of the observation matrix.The hypotheses to be tested are: H0: All c populations have the same median H1: Not all the populations have the same medianUnlike the Kruskal-Wallis test, the Friedman ranks are computed within each block rather than within a pooled sample.
1516.6 Friedman Test for Related Samples LO16-6Chapter 16Performing the TestCompute the test statistic:The Friedman test statistic Fcalc follows a chi-square distribution with n = c – 1 degrees of freedom.Reject H0 if F > c2a or if p-value ≤ a.
1616.7 Spearman Rank Correlation Test LO16-7Chapter 16LO16-7: Use the Spearman rank correlation.The sign of rs indicates whether the relationship isdirect - ranks tend to vary in the same direction, or inverse - ranks tend to vary in opposite directionsThe magnitude of rs indicated the degree of relationship. Ifrs is near 0 - there is little or no agreement between rankings rs is near +1 - there is strong direct agreement rs is near 1 - there is strong inverse agreement
1716.7 Spearman Rank Correlation Test LO16-7Chapter 16Performing the TestThe sums of ranks within each column must always be n(n+1)/2.Next, compute the difference in ranks di for each observation.The rank differences should sum to zero.Calculate the sample rank correlation coefficient rs.
1816.7 Spearman Rank Correlation Test LO16-7Chapter 16Performing the TestFor a right-tailed test for example, the hypotheses to be tested are H0: True rank correlation is zero (rs ≤ 0) H1: True rank correlation is positive (rs > 0)If n is large (at least 20 observations), then rs may be assumed to follow the normal distribution using the test statisticHere we will reject H0 if zcalc > za or if p-value ≤ a.