Rank Sum

Embed Size (px)

DESCRIPTION

ranksum test

Citation preview

  • Statistical Methods II

    Session 9Non Parametric Testing The Wilcoxon Rank Sum Test (also known as the Mann Whitney Test)

  • Wilcoxon Rank Sum TestRecall that Non-Parametric tests (in all forms) should be your Plan B.

    In the previous two sessions, we covered the Sign Test and the Wilcoxon Signed Rank Test both of which can be used when testing the center location of a single population (or a pair).

    In the current session, we will be covering the Wilcoxon Rank Sum Test used with two independent samples.

  • Wilcoxon Rank Sum Test

    TestParametricNon ParametricOne Quantitative Response VariableOne Sample ttestSign TestOne Quantitative Response Variable Two Values from Paired SamplesPaired Sample ttestWilcoxon Signed Rank TestOne Quantitative Response Variable One Qualitative Independent Variable with two groupsTwo Independent Sample ttestWilcoxon Rank Sum or Mann Whitney TestOne Quantitative Response Variable One Qualitative Independent Variable with three or more groupsANOVAKruskall Wallis

  • Wilcoxon Rank Sum TestAlthough this test does not have parametric assumptions specifically the number of observations can be small it does require two things:

    The two groups being tested are independent of each other.The two groups should have approximately similar distributions (this test evaluates the shift of the distributions).

  • Wilcoxon Rank Sum TestThe hypothesis statements function the same way as the two sample ttest but we are focused on the medians rather than on the means:

    H0: 1 2 = 0H1: 1 2 0

    These could also be expressed as one tailed tests.

  • Wilcoxon Rank Sum TestStep 1: List the data values from both samples in a single list arranged from smallest to largest.

    Step 2: In the next column, assign the numbers 1 to N (where N = n1+n2). These are the ranks of the observations. As before, if there are ties, assign the average of the ranks the values would receive to each of the tied values.

    Step 3: Let W denote the sum of the ranks for the obs from Population 1.

    Note that if there is no difference between the two medians (the null is true), the value of W will be around half the sum of the ranks {(n1(1+N))/2}

  • Wilcoxon Rank Sum TestThe following data measures the reaction times of two samples of people one set drank alcohol, one set drank a placebo.

    AlcoholPlacebo1.56.901.56.371.761.631.44.831.11.953.07.78.98.861.27.612.56.381.321.97

  • Wilcoxon Rank Sum TestFrom this dataset, the hypothesis statements will be:

    H0: The median reaction times for the placebo group is the same or slower than the median reaction time for the alcohol group.H1: The median reaction times for the placebo group is faster than the median reaction time for the alcohol group.

  • Wilcoxon Rank Sum Test

    DataRankAlcohol or Placebo Group.371Placebo.382Placebo.613Placebo.784Placebo.835Placebo.866Placebo.907Placebo.958Placebo.989Alcohol1.1110Alcohol1.2711Alcohol1.3212Alcohol1.4413Alcohol1.4514Alcohol1.4615Alcohol1.6316Placebo1.7617Alcohol1.9718Placebo2.5619Alcohol3.0720Alcohol

  • Wilcoxon Rank Sum TestIf we sum the ranks of the Placebo group, we get W = 1+2+3+4+5+6+7+8+16+18 = 70.

    Since the middle point of the ranks is 105 - (10*21)/2 and the placebo ranks is much lower, we have initial evidence to conclude that the placebo group had quicker reaction times than did the alcohol group.

    A z-score approximation can be found on page S2-11 of your book.

  • Wilcoxon Rank Sum TestLets do this same test using SAS

    *