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

KRUSKAL WALLIS

Name:
    KRUSKAL WALLIS
Type:
    Analysis Command
Purpose:
    Perform a Kruskal Wallis test that k population means are equal.
Description:
    Analysis of Variance (ANOVA) is a data analysis technique for examining the significance of the factors (= independent variables) in a multi-factor model. The one factor model can be thought of as a generalization of the two sample t-test. That is, the two sample t-test is a test of the hypothesis that two population means are equal. The one factor ANOVA tests the hypothesis that k population means are equal.

    The Kruskal Wallis test can be applied in the one factor ANOVA case. It is a non-parametric test for the situation where the ANOVA normality assumptions may not apply.

    Let ni (i = 1, 2, ..., k) represent the sample sizes for each of the k groups (i.e., samples) in the data. Next, rank the combined sample. Then compute Ri = the sum of the ranks for group i. Then the Kruskal Wallis test statistic is:

      H = [12/(N(N+1)] SUM[Ri**2/Ni] - 3(N+1)

    This statistic approximates a chi-square distribution with k-1 degrees of freedom if the null hypothesis of equal populations is true. Each of the ni should be at least 5 for the approximation to be valid.

    We reject the null hypothesis of equal population means if the test statistic H is greater than CHIPPF(ALPHA,K-1) where CHIPPF is the chi-square percent point function

    More formally,

    H0: U<sub>1</sub>=U<sub>2</sub>= ... = U<sub>k</sub>
    HA: Ui not equal Uj
    for at least one set of i and j.
    Test Statistic: H = [12/(N(N+1)] SUM[Ri**2/Ni] - 3(N+1)
    Significance Level: ALPHA, typically set to 0.05.
    Critical Region: H > CHIPPF( alpha,k-1) where CHIPPF is the chi-square percent point function.
    Conclusion: Reject the null hypothesis if the test statistic is in the critical region.

Syntax:
    KRUSKAL WALLIS <y> <x>             <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response (= dependent) variable;
                <x> is the factor (= independent) variable;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    KRUSKAL WALLIS Y X
    KRUSKAL WALLIS Y X SUBSET X = 1 TO 4
Default:
    None
Synonyms:
    The following are synonyms for KRUSKAL WALLIS:

      KRUSKAL WALLIS TEST
      KRUSKAL TEST
Related Commands:
    ANOVA = Perform an analysis of variance.
    MEDIAN POLISH = Carries out a robust ANOVA.
    YATES ANALYSIS = Analyze a Yate's design.
    BLOCK PLOT = Generate a block plot.
    T TEST = Carries out a t test.
    RANK SUM TEST = Perform a rank sum test.
    SIGNED RANK TEST = Perform a signed rank test.
    PLOT = Plots (e.g., residuals and GANOVA ).
Reference:
    "Probability and Statistics for Engineers and Scientists", 2nd ed., Walpole and Myers, MacMillian, 1978.
Applications:
    Analysis of Variance
Implementation Date:
    1999/8
Program:
    SKIP 25
    READ SPLETT2.DAT Y MACHINE
    KRUSKAL WALLIS Y MACHINE

    The following output is generated.

                  KRUSKALL-WALLIS TEST FOR ONE-WAY ANOVA
     
    1. STATISTICS
          NUMBER OF OBSERVATIONS    =       99
          NUMBER OF GROUPS          =        4
          KRUSKALL-WALLIS TEST STATISTIC   =    41.06223
     
    2. PERCENT POINTS OF THE CHI-SQUARE REFERENCE DISTRIBUTION
       FOR KRUSKALL-WALLIS TEST STATISTIC
          0          % POINT    =    .0000000
          50         % POINT    =    2.365974
          75         % POINT    =    4.108345
          90         % POINT    =    6.251388
          95         % POINT    =    7.814727
          99         % POINT    =    11.34487
          99.9       % POINT    =    16.26626
     
     
             100.0000       % Point:     41.06223
     
    3. CONCLUSION (AT THE 5% LEVEL):
          THE        4 SAMPLES DO NOT COME FROM IDENTICAL POPULATIONS.
        

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