Download Presentation
## Chapter 11

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**Chapter 11**Nonparametric Tests Larson/Farber 4th ed**Chapter Outline**• 11.1 The Sign Test • 11.2 The Wilcoxon Tests • 11.3 The Kruskal-Wallis Test • 11.4 Rank Correlation • 11.5 The Runs Test Larson/Farber 4th ed**Section 11.1**The Sign Test Larson/Farber 4th ed**Section 11.1 Objectives**• Use the sign test to test a population median • Use the paired-sample sign test to test the difference between two population medians (dependent samples) Larson/Farber 4th ed**Nonparametric Test**Nonparametric test • A hypothesis test that does not require any specific conditions concerning the shape of the population or the value of any population parameters. • Generally easier to perform than parametric tests. • Usually less efficient than parametric tests (stronger evidence is required to reject the null hypothesis). Larson/Farber 4th ed**Sign Test for a Population Median**Sign Test • A nonparametric test that can be used to test a population median against a hypothesized value k. • Left-tailed test: H0: median k and Ha: median < k • Right-tailed test: H0: median k and Ha: median > k • Two-tailed test: H0: median = k and Ha: median k Larson/Farber 4th ed**Sign Test for a Population Median**• To use the sign test, each entry is compared with the hypothesized median k. • If the entry is below the median, a sign is assigned. • If the entry is above the median, a + sign is assigned. • If the entry is equal to the median, 0 is assigned. • Compare the number of + and – signs. Larson/Farber 4th ed**Sign Test for a Population Median**Test Statistic for the Sign Test • When n 25, the test statistic x for the sign test is the smaller number of + or signs. • When n > 25, the test statistic for the sign test is where x is the smaller number of + or signs and n is the sample size (the total number of + or signs). Larson/Farber 4th ed**Performing a Sign Test for a Population Median**In Words In Symbols • State the claim. Identify the null and alternative hypotheses. • Specify the level of significance. • Determine the sample size n by assigning + signs and – signs to the sample data. • Determine the critical value. State H0 and Ha. Identify . n = total number of + and – signs If n 25, use Table 8. If n> 25, use Table 4. Larson/Farber 4th ed**Performing a Sign Test for a Population Median**In Words In Symbols Calculate the test statistic. If n 25, use x.If n > 25, use Make a decision to reject or fail to reject the null hypothesis. Interpret the decision in the context of the original claim. If the test statistic is less than or equal to the critical value, reject H0. Otherwise, fail to reject H0. Larson/Farber 4th ed**Example: Using the Sign Test**A bank manager claims that the median number of customers per day is no more than 750. A teller doubts the accuracy of this claim. The number of bank customers per day for 16 randomly selected days are listed below. At α = 0.05, can the teller reject the bank manager’s claim? 775 765 801 742 754 753 739 751 745 750 777 769 756 760 782 789 Larson/Farber 4th ed**Solution: Using the Sign Test**median ≤ 750 • H0: • Ha: median > 750 • Compare each data entry with the hypothesized median 750 775 765 801 742 754 753 739 751 745 750 777 769 756 760 782 789 + + + – + + – + – 0 + + + + + + • There are 3 – signs and 12 + signs • n = 12 + 3 = 15 Larson/Farber 4th ed**Solution: Using the Sign Test**0.05 • α = • Critical Value: Use Table 8 (n≤ 25) Critical value is 3 Larson/Farber 4th ed**Solution: Using the Sign Test**• Test Statistic: x = 3 (n ≤ 25; use smaller number of + or – signs) Reject H0 • Decision: At the 5% level of significance, the teller can reject the bank manager’s claim that the median number of customers per day is no more than 750. Larson/Farber 4th ed**Example: Using the Sign Test**A car dealership claims to give customers a median trade-in offer of at least $6000. A random sample of 103 transactions revealed that the trade-in offer for 60 automobiles was less than $6000 and the trade-in offer for 40 automobiles was more than $6000. At α = 0.01, can you reject the dealership’s claim? Larson/Farber 4th ed**Solution: Using the Sign Test**• H0: • Ha: • α = • Critical value: median ≥ 6000 • Test Statistic: • Decision: There are 60 – signs and 40 + signs. n = 60 + 40 = 100 x = 40 median < 6000 0.01 n > 25 0.01 Fail to Reject H0 -2.33 z -2.33 0 At the 1% level of significance you cannot reject the dealership’s claim. -1.9 Larson/Farber 4th ed**The Paired-Sample Sign Test**Paired-sample sign test • Used to test the difference between two population medians when the populations are not normally distributed. • For the paired-sample sign test to be used, the following must be true. • A sample must be randomly selected from each population. • The samples must be dependent (paired). • The difference between corresponding data entries is found and the sign of the difference is recorded. Larson/Farber 4th ed**Performing The Paired-Sample Sign Test**In Words In Symbols • State the claim. Identify the null and alternative hypotheses. • Specify the level of significance. • Determine the sample size n by finding the difference for each data pair. Assign a + sign for a positive difference, a – sign for a negative difference, and a 0 for no difference. State H0 and Ha. Identify . n = total number of + and – signs Larson/Farber 4th ed**Performing The Paired-Sample Sign Test**In Words In Symbols • Determine the critical value. • Find the test statistic. Use Table 8 inAppendix B. x = lesser number of + and – signs Make a decision to reject or fail to reject the null hypothesis. Interpret the decision in the context of the original claim. If the test statistic is less than or equal to the critical value, reject H0. Otherwise, fail to reject H0. Larson/Farber 4th ed**Example: Paired-Sample Sign Test**A psychologist claims that the number of repeat offenders will decrease if first-time offenders complete a particular rehabilitation course. You randomly select 10 prisons and record the number of repeat offenders during a two-year period. Then, after first-time offenders complete the course, you record the number of repeat offenders at each prison for another two-year period. The results are shown on the next slide. Atα = 0.025, can you support the psychologist’s claim? Larson/Farber 4th ed**Example: Paired-Sample Sign Test**Solution: The number of repeat offenders will not decrease. • H0: • Ha: The number of repeat offenders will decrease. • Determine the sign of the difference between the “before” and “after” data. Larson/Farber 4th ed**Solution: Paired-Sample Sign Test**0.025 (one-tailed) • α = • n = • Critical value: 1 + 9 = 10 Critical value is 1 Larson/Farber 4th ed**Solution: Paired-Sample Sign Test**• Test Statistic: • Decision: x = 1 (the smaller number of + or – signs) Reject H0 At the 2.5% level of significance, you can support the psychologist’s claim that the number of repeat offenders will decrease. Larson/Farber 4th ed**Section 11.1 Summary**• Used the sign test to test a population median • Used the paired-sample sign test to test the difference between two population medians (dependent samples) Larson/Farber 4th ed**Section 11.2**The Wilcoxon Tests Larson/Farber 4th ed**Section 11.2 Objectives**• Use the Wilcoxon signed-rank test to determine if two dependent samples are selected from populations having the same distribution • Use the Wilcoxon rank sum test to determine if two independent samples are selected from populations having the same distribution. Larson/Farber 4th ed**The Wilcoxon Signed-Rank Test**Wilcoxon Signed-Rank Test • A nonparametric test that can be used to determine whether two dependent samples were selected from populations having the same distribution. • Unlike the sign test, it considers the magnitude, or size, of the data entries. Larson/Farber 4th ed**Performing The Wilcoxon Signed-Rank Test**In Words In Symbols • State the claim. Identify the null and alternative hypotheses. • Specify the level of significance. • Determine the sample size n, which is the number of pairs of data for which the difference is not 0. • Determine the critical value. State H0 and Ha. Identify . Use Table 9 in Appendix B. Larson/Farber 4th ed**Performing The Wilcoxon Signed-Rank Test**In Words In Symbols • Calculate the test statistic ws. • Complete a table using the headers listed at the right. • Find the sum of the positive ranks and the sum of the negative ranks. • Select the smaller of absolute values of the sums. Headers: Sample 1, Sample 2, Difference, Absolute value, Rank, and Signed rank. Signed rank takes on the same sign as its corresponding difference. Larson/Farber 4th ed**Performing The Wilcoxon Signed-Rank Test**In Words In Symbols Make a decision to reject or fail to reject the null hypothesis. Interpret the decision in the context of the original claim. If ws is less than or equal to the critical value, reject H0. Otherwise, fail to reject H0. Larson/Farber 4th ed**Example: Wilcoxon Signed-Rank Test**A sports psychologist believes that listening to music affects the length of athletes’ workout sessions. The length of time (in minutes) of 10 athletes’ workout sessions, while listening to music and while not listening to music, are shown in the table. At α = 0.05, can you support the sports psychologist’s claim? Larson/Farber 4th ed**Solution: Wilcoxon Signed-Rank Test**There is no difference in the length of the athletes’ workout sessions. • H0: • Ha: • α = • n = There is a difference in the length of the athletes’ workout sessions. 0.05 (two-tailed test) 10 (the difference between each data pair is not 0) Larson/Farber 4th ed**Solution: Wilcoxon Signed-Rank Test**• Critical Value Table 9 Critical value is 8 Larson/Farber 4th ed**Solution: Wilcoxon Signed-Rank Test**• Test Statistic: 7 7 7.5 7 -2 2 2 -2 4.5 -4.5 5 -5 3 3 3 3 1 -1 -1 1 6 6 6 6 8 9 8 9 7 7 7.5 7.5 4.5 4.5 5 5 9 9 10 10 Larson/Farber 4th ed**Solution: Wilcoxon Signed-Rank Test**• Test Statistic: The sum of the negative ranks is: -1 + (-2) + (-4.5) = -7.5 The sum of the positive ranks is: (+3) + (+4.5) + (+6) + (+7.5) + (+7.5) + (+9) + (+10) = 47.5 ws = 7.5 (the smaller of the absolute value of these two sums: |-7.5| < |47.5|) Larson/Farber 4th ed**Solution: Wilcoxon Signed-Rank Test**• Decision: Reject H0 At the 5% level of significance, you have enough evidence to support the claim that music makes a difference in the length of athletes’ workout sessions. Larson/Farber 4th ed**The Wilcoxon Rank Sum Test**Wilcoxon Rank Sum Test • A nonparametric test that can be used to determine whether two independent samples were selected from populations having the same distribution. • A requirement for the Wilcoxon rank sum test is that the sample size of both samples must be at least 10. • n1 represents the size of the smaller sample and n2 represents the size of the larger sample. • When calculating the sum of the ranks R, use the ranks for the smaller of the two samples. Larson/Farber 4th ed**Test Statistic for The Wilcoxon Rank Sum Test**• Given two independent samples, the test statistic z for the Wilcoxon rank sum test is where R = sum of the ranks for the smaller sample, and Larson/Farber 4th ed**Performing The Wilcoxon Rank Sum Test**In Words In Symbols • State the claim. Identify the null and alternative hypotheses. • Specify the level of significance. • Determine the critical value(s). • Determine the sample sizes. State H0 and Ha. Identify . Use Table 4 in Appendix B. n1 ≤ n2 Larson/Farber 4th ed**Performing The Wilcoxon Rank Sum Test**In Words In Symbols • Find the sum of the ranks for the smaller sample. • List the combined data in ascending order. • Rank the combined data. • Add the sum of the ranks for the smaller sample. R Larson/Farber 4th ed**Performing The Wilcoxon Rank Sum Test**In Words In Symbols Calculate the test statistic. Make a decision to reject or fail to reject the null hypothesis. Interpret the decision in the context of the original claim. If z is in the rejection region, reject H0. Otherwise, fail to reject H0. Larson/Farber 4th ed**Example: Wilcoxon Rank Sum Test**The table shows the earnings (in thousands of dollars) of a random sample of 10 male and 12 female pharmaceutical sales representatives. At α = 0.10, can you conclude that there is a difference between the males’ and females’ earnings? Larson/Farber 4th ed**Solution: Wilcoxon Rank Sum Test**There is no difference between the males’ and the females’ earnings. • H0: • Ha: There is a difference between the males’ and the females’ earnings. • α = • Rejection Region: 0.10 (two-tailed test) 0.05 0.05 Z -1. 645 0 1.645 Larson/Farber 4th ed**Solution: Wilcoxon Rank Sum Test**To find the values of R, μR, andR, construct a table that shows the combined data in ascending order and the corresponding ranks. Larson/Farber 4th ed**Solution: Wilcoxon Rank Sum Test**R = 2 + 5.5 + 10.5 + 12 + 13 + 15.5 + 17 + 19.5 +21 + 22 = 138 • Using n1 = 10 and n2 = 12, we can find μR, andR. Because the smaller sample is the sample of males, R is the sum of the male rankings. Larson/Farber 4th ed**Solution: Wilcoxon Rank Sum Test**• H0: • Ha: no difference in earnings. • Test Statistic difference in earnings. • α = • Rejection Region: 0.10 • Decision: Fail to reject H0 At the 10% level of significance, you cannot conclude that there is a difference between the males’ and females’ earnings. 0.05 0.05 Z -1. 645 0 1.645 1.52 Larson/Farber 4th ed**Section 11.2 Summary**• Used the Wilcoxon signed-rank test to determine if two dependent samples are selected from populations having the same distribution • Used the Wilcoxon rank sum test to determine if two independent samples are selected from populations having the same distribution. Larson/Farber 4th ed**Section 11.3**The Kruskal-Wallis Test Larson/Farber 4th ed**Section 11.3 Objectives**• Use the Kruskal-Wallis test to determine whether three or more samples were selected from populations having the same distribution. Larson/Farber 4th ed**The Kruskal-Wallis Test**Kruskal-Wallis test • A nonparametric test that can be used to determine whether three or more independent samples were selected from populations having the same distribution. • The null and alternative hypotheses for the Kruskal-Wallis test are as follows. H0: There is no difference in the distribution of the populations. Ha: There is a difference in the distribution of the populations. Larson/Farber 4th ed