1 / 80

Chapter 15: Nonparametric Statistics

Chapter 15: Nonparametric Statistics. Section 15.1 How Can We Compare Two Groups by Ranking?. Learning Objectives. Nonparametric Statistical Methods Wilcoxon Test The Wilcoxon Rank Sum Using the Wilcoxon Test with a Quantitative Response Nonparametric Estimation Comparing Groups.

Télécharger la présentation

Chapter 15: Nonparametric Statistics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 15: Nonparametric Statistics Section 15.1 How Can We Compare Two Groups by Ranking?

  2. Learning Objectives • Nonparametric Statistical Methods • Wilcoxon Test • The Wilcoxon Rank Sum • Using the Wilcoxon Test with a Quantitative Response • Nonparametric Estimation Comparing Groups

  3. Learning Objective 1:Nonparametric Statistical Methods • Nonparametric methods are especially useful: • When the data are ranks for the subjects, rather than quantitative measurements. • When it’s inappropriate to assume normality.

  4. Learning Objective 1:Example: How to Get A Better Tan • Experiment: A student wanted to compare ways of getting a tan without exposure to the sun. • She decided to investigate which of two treatments would give a better tan: • An “instant bronze sunless tanner” lotion • A tanning studio

  5. Learning Objective 1:Example: How to Get A Better Tan • Subjects: • Five female students participated in the experiment. • Three of the students were randomly selected to use the tanning lotion. • The other two students used the tanning studio.

  6. Learning Objective 1:Example: How to Get A Better Tan • Results: • The girls’ tans were ranked from 1 to 5, with 1 representing the best tan. • Possible Outcomes: • Consider all possible rankings of the girls’ tans. • A table of possibilities is displayed on the next page.

  7. Learning Objective 1:Example: How to Get A Better Tan

  8. Learning Objective 1:Example: How to Get A Better Tan • For each possible outcome, a mean rank is calculated for the ‘lotion’ group and for the ‘studio’ group. • The difference in the mean ranks is then calculated for each outcome.

  9. Learning Objective 1:Example: How to Get A Better Tan • For this experiment, the samples were independent random samples – the responses for the girls using the tanning lotion were independent of the responses for the girls using the tanning studio.

  10. Learning Objective 1:Example: How to Get A Better Tan • Suppose that the two treatments have identical effects. • A girl’s tan would be the same regardless of which treatment she uses. • Then, each of the ten possible outcomes is equally likely. So, each outcome has probability of 1/10.

  11. Learning Objective 1:Example: How to Get A Better Tan • Using the ten possible outcomes, we can construct a sampling distribution for the difference between the sample mean ranks. • The distribution is displayed on the next page.

  12. Learning Objective 1:Example: How to Get A Better Tan

  13. Learning Objective 1:Example: How to Get A Better Tan • Graph of the Sampling Distribution:

  14. Learning Objective 1:Example: How to Get A Better Tan • The student who planned the experiment hypothesized that the tanning studio would give a better tan than the tanning lotion.

  15. Learning Objective 1:Example: How to Get A Better Tan • She wanted to test the null hypothesis: • H0: The treatments are identical in tanning quality. • Against • Ha: Better tanning quality results with the tanning studio.

  16. Learning Objective 1:Example: How to Get A Better Tan • This alternative hypothesis is one-sided. • If Ha were true, we would expect the ranks to be smaller (better) for the tanning studio. • Thus, if Ha were true, we would expect the differences between the sample mean rank for the tanning lotion and the sample mean rank for the tanning studio to be positive.

  17. Learning Objective 2:Wilcoxon Test • The test comparing two groups based on the sampling distribution of the difference between the sample mean ranks is called the Wilcoxon test.

  18. Learning Objective 2:Wilcoxon Nonparametric Test for Comparing Two Groups • Assumptions: Independent random samples from two groups.

  19. Learning Objective 2:Wilcoxon Nonparametric Test for Comparing Two Groups • Hypotheses: • H0: Identical population distributions for the two groups (this implies equal expected values for the sample mean ranks). • Ha: Different expected values for the sample mean ranks (two-sided), or • Ha: Higher expected value for the sample mean rank for a specified group (one-sided).

  20. Learning Objective 2:Wilcoxon Nonparametric Test for Comparing Two Groups • Test Statistic: • Difference between sample mean ranks for the two groups (Equivalently, can use sum of ranks for one sample).

  21. Learning Objective 2:Wilcoxon Nonparametric Test for Comparing Two Groups • P-value: One-tail or two-tail probability, depending on Ha, that the difference between the sample mean ranks is as extreme or more extreme than observed. • Conclusion: Report the P-value and interpret it. If a decision is needed, reject H0if the P-value≤ significance level such as 0.05.

  22. Learning Objective 2:Example: Does the UV Tanning Studio Give a Better Tan than the Tanning Lotion? • For the actual experiment: • the ranks were (2,4,5) for the girls using the tanning lotion • the ranks were (1,3) for the girls using the tanning studio.

  23. Learning Objective 2:Example: Does the UV Tanning Studio Give a Better Tan than the Tanning Lotion? • The mean rank for the tanning lotion is: (2+4+5)/3 = 3.7 • The mean rank for the tanning studio is: (1+3)/2=2

  24. Learning Objective 2:Example: Does the UV Tanning Studio Give a Better Tan than the Tanning Lotion? • The test statistic is the difference between the sample mean ranks: • 3.7 – 2 = 1.7

  25. Learning Objective 2:Example: Does the UV Tanning Studio Give a Better Tan than the Tanning Lotion? • The one-sided alternative hypothesis states that the tanning studio gives a better tan. • This means that the expected mean rank would be larger for the tanning lotion than for the tanning studio, if Ha is true. • And, the difference between the mean ranks would be positive.

  26. Learning Objective 2:Example: Does the UV Tanning Studio Give a Better Tan than the Tanning Lotion? • The test statistic we obtained from the data was: • Difference between the sample mean ranks = 1.7. • P-value = P(difference between sample mean ranks at least as large as 1.7)

  27. Learning Objective 2:Example: Does the UV Tanning Studio Give a Better Tan than the Tanning Lotion? • The P-value can be obtained from the graph of the sampling distribution (as seen on a previous slide and displayed again here):

  28. Learning Objective 2:Example: Does the UV Tanning Studio Give a Better Tan than the Tanning Lotion? • P-value = 0.20. • This is not a very small P-value. • The evidence does not strongly support the claim that the tanning studio gives a better tan.

  29. Learning Objective 3:The Wilcoxon Rank Sum • The Wilcoxon test can, equivalently, use as the test statistic the sum of the ranks in just one of the samples. • This statistic will have the same probabilities as the differences between the sample mean ranks. • Some software reports the sum of ranks as the Wilcoxon rank sum statistic.

  30. Learning Objective 3:Example: Is there a treatment difference between the UV Tanning Studio and the Tanning Lotion? • Suppose the experiment was designed with a two-sided alternative hypothesis: • H0: The treatments are identical in tanning quality. • Ha: The treatments are different in tanning quality.

  31. Learning Objective 3:Example: Is there a treatment difference between the UV Tanning Studio and the Tanning Lotion?

  32. Learning Objective 3:The Wilcoxon Rank Sum • Often, ties occur when we rank the observations • In this case, we average the ranks in assigning them to those subjects • Example: suppose a girl using the tanning studio got the best tans, two girls using the tanning lotion got the two worst tans, but the other two girls had equally good tans Tanning studio ranks: 1, 2.5 Tanning lotion ranks: 2.5, 4, 5

  33. Learning Objective 4:Using the Wilcoxon Test with a Quantitative Response • When the response variable is quantitative, the Wilcoxon test is applied by converting the observations to ranks. • For the combined sample, the observations are ordered from smallest to largest, the smallest observations gets rank 1, the second smallest gets rank 2, and so forth. • The test compares the mean ranks for the two samples.

  34. Learning Objective 4:Example: Do Drivers Using Cell Phones Have Slower Reaction Times? • Experiment: • A sample of 64 college students were randomly assigned to a cell phone group or a control group, 32 to each. • On a machine that simulated driving situations, participants were instructed to press a “brake button” when they detected a red light.

  35. Learning Objective 4:Example: Do Drivers Using Cell Phones Have Slower Reaction Times? • Experiment: • The control group listened to the radio while they performed the simulated driving. • The cell phone group carried out a conversation on a cell phone. • Each subject’s response time to the red lights is recorded and averaged over all of his/her trials.

  36. Learning Objective 4:Example: Do Drivers Using Cell Phones Have Slower Reaction Times? • Boxplots of the data:

  37. Learning Objective 4:Example: Do Drivers Using Cell Phones Have Slower Reaction Times? • The box plots do not show any substantial skew, but there is an extreme outlier for the cell phone group. • The t inferences that we have used previously assume normal population distributions. • The Wilcoxon Test does not assume normality. This test can be used in place of the t test if the normality assumption is in question.

  38. Learning Objective 4:Example: Do Drivers Using Cell Phones Have Slower Reaction Times? • To use the Wilcoxon test, we need to rank the data (response times) from 1 (smallest reaction time) to 64 (largest reaction time). • The test statistic is then calculated from the ranks.

  39. Learning Objective 4:Example: Do Drivers Using Cell Phones Have Slower Reaction Times? • The next page shows the output for the hypothesis test: • H0: The distribution of reaction times is identical for the two groups. • Ha: The distribution of reaction times differs for the two groups.

  40. Learning Objective 4:Example: Do Drivers Using Cell Phones Have Slower Reaction Times?

  41. Learning Objective 4:Example: Do Drivers Using Cell Phones Have Slower Reaction Times? • The small P-value (.019) shows strong evidence against the null hypothesis. • The sample mean ranks suggest that reaction times tend to be slower for those using cell phones.

  42. Learning Objective 4:Example: Do Drivers Using Cell Phones Have Slower Reaction Times? • Insight: • The Wilcoxon test is not affected by outliers. • No matter how far the largest observation falls from the next largest, it still gets the same rank.

  43. Learning Objective 5:Nonparametric Estimation Comparing Groups • When the response variable is quantitative, we can compare a measure of center for the two groups. • One way to do this is by comparing means. • This method requires the assumption of normal population distributions.

  44. Learning Objective 5:Nonparametric Estimation Comparing Groups • When the response distribution is highly skewed, nonparametric methods are preferred. • For highly skewed distributions, a better measure of the center is the median. • We can then estimate the difference between the population medians for the two groups.

  45. Learning Objective 5:Nonparametric Estimation Comparing Groups • Most software for the Wilcoxon test reports point and interval estimates comparing medians. • Some software refers to the equivalent Mann-Whitney test.

  46. Learning Objective 5:Nonparametric Estimation Comparing Groups • The Wilcoxon test (and the Mann-Whitney test) does not require a normal population assumption. • It does require an extra assumption: the population distributions for the two groups are symmetric and have the same shape.

  47. Learning Objective 5:Example: Nonparametric Estimation Comparing Groups • The point estimate for the difference in medians is given by 44.5 (note that this is not the same as the difference between the two sample medians) • A 95.1% CI for the difference is (8.99, 79.01) • Since 0 is not included in the interval, we conclude that the median reaction times are not the same for the cell phone and control groups

  48. Chapter 15: Nonparametric Statistics Section 15.2 Nonparametric Methods for Several Groups and for Matched Pairs

  49. Learning Objectives • Comparing Mean Ranks of Several Groups • ANOVA test vs. Kruskal-Wallis test • Summary: Kruskal-Wallis Test • Comparing Matched Pairs: The Sign Test • The Sign Test for Small Samples • The Wilcoxon Signed-Ranks Test

  50. Learning Objective 1:Comparing Mean Ranks of Several Groups • The Wilcoxon test for comparing mean ranks of two groups extends to a comparison of mean ranks for several groups. • This test is called the Kruskal-Wallis test.

More Related