SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Contacts SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Auxiliary Chapter

RANK SUM TEST

Name:
    RANK SUM TEST
Type:
    Analysis Command
Purpose:
    Perform a two sample rank sum test.
Description:
    The t-test is the standard test for testing that the difference between population means for two non-paired samples are equal. If the populations are non-normal, particularly for small samples, then the t-test may not be valid. The rank sum test is an alternative that can be applied when distributional assumptions are suspect. However, it is not as powerful as the t-test when the distributional assumptions are in fact valid.

    The rank sum test is also commonly called the Mann-Whitney rank sum test or simply the Mann-Whitney test. Note that even though this test is commonly called the Mann-Whitney test, it was in fact developed by Wilcoxon.

    To form the rank sum test, rank the combined samples. Then compute the sum of the ranks for sample one, T1, and the sum of the ranks for sample two, T2. If the sample sizes are equal, the rank sum test statistic is the minimum of T1 and T2. If the sample sizes are unequal, then find T1 equal the sum of the ranks for the smaller sample. Then compute T2 = n1(n1 + n2 + 1) - T1. T is the minimum of T1 and T2. Sufficiently small values of T cause rejection of the null hypothesis that the sample means are equal.

    Significance levels have been tabulated for small values of n1 and n2. For sufficiently large n1 and n2, the following normal approximation is used:

      Z = (ABS(u - T) - 0.5)/sigma

    where

      u = N1*(N1 + N2 + 1)/2

      sigma = SQRT(N2*u/6)

Syntax:
    RANK SUM TEST <y1> <y2>             <SUBSET/EXCEPT/FOR qualification>
    where <y1> is the first response variable;
                <y2> is the second response variable;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    RANK SUM TEST Y1 Y2
    RANK SUM TEST Y1 Y2 SUBSET TAG > 2
Note:
    Dataplot saves the following internal parameters after a sign test:

      STATVAL = The rank sum test statistic

      CUTLOW90 = 0.05 critical value
      CUTUPP90 = 0.95 critical value
      CUTLOW95 = 0.025 critical value
      CUTUPP95 = 0.975 critical value
      CUTLOW99 = 0.005 critical value
      CUTUPP99 = 0.995 critical value

    Note that the above critical values are the lower and upper tails for two sided tests (i.e., each tail is alpha/2. For example, CUTLOW90 is the lower 5% of the normal percent point function (adjusted for the mean and standard deviation). This is the critical regions for alpha = 0.10, so there is 0.05 in each tail.

Default:
    None
Synonyms:
    The following are synonyms for RANK SUM TEST:

      MANN WHITNEY RANK SUM TEST
      MANN WHITNEY RANK SUM
      MANN WHITNEY TEST
      MANN WHITNEY
      RANK SUM
Related Commands:
    T-TEST = Compute a t-test.
    SIGN TEST = Compute a sign test.
    SIGNED RANK TEST = Compute a signed rank test.
    CHI-SQUARED 2 SAMPLE TEST = Compute a two sample chi-square test.
    BIHISTOGRAM = Generates a bihistogram.
    QUANTILE-QUANTILE PLOT = Generate a quantile-quantile plot.
    BOX PLOT = Generates a box plot.
Reference:
    "Statistical Methods", Eighth Edition, Snedecor and Cochran, 1989, Iowa State University Press, pp. 142-144.
Applications:
    Confirmatory Data Analysis
Implementation Date:
    1999/5
Program:
    SKIP 25
    READ NATR323.DAT Y1 Y2
    RETAIN Y2 SUBSET Y2 > -90
    RANK SUM TEST Y1 Y2

    The following output is generated.

                     MANN WHITNEY RANK SUM TEST
                        (2-SAMPLE)
    HYPOTHESIS BEING TESTING--POPULATION MEANS MU1 = MU2
    SAMPLE SIZE FOR VARIABLE 1              =       13
    SAMPLE SIZE FOR VARIABLE 2              =        8
    RANK SUM FOR VARIABLE 1                 =    180.0000
    RANK SUM FOR VARIABLE 2                 =    51.00000
    RANK SUM TEST STATITIC (U)              =    51.00000
     
    HYPOTHESIS     ACCEPTANCE INTERVAL      CONCLUSION
    MU1 = MU2      U  >    60.00000         REJECT
        

Date created: 6/5/2001
Last updated: 4/4/2003
Please email comments on this WWW page to alan.heckert@nist.gov.