SlideShare une entreprise Scribd logo
1  sur  8
The Kruskal-Wallis H Test

• The Kruskal-Wallis H Test is a
  nonparametric procedure that can be used to
  compare more than two populations in a
  completely randomized design.
• All n = n1+n2+…+nk measurements are jointly
  ranked (i.e.treat as one large sample).
• We use the sums of the ranks of the k samples
  to compare the distributions.
The Kruskal-Wallis H Test
Rank the total measurements in all k samples
Rank the total measurements in all k samples
from 1 to n. Tied observations are assigned average of
 from 1 to n. Tied observations are assigned average of
the ranks they would have gotten if not tied.
 the ranks they would have gotten if not tied.
Calculate
 Calculate
    T = rank sum for the ith sample ii = 1, 2,…,k
     Ti i = rank sum for the ith sample = 1, 2,…,k
And the test statistic
 And the test statistic

                12      Ti 2
           H=         ∑      − 3(n + 1)
              n(n + 1) ni
The Kruskal-Wallis H Test

H00:: the k distributions are identical versus
H the k distributions are identical versus
Haa:: at least one distribution is different
H at least one distribution is different
Test statistic: Kruskal-Wallis H
Test statistic: Kruskal-Wallis H
When H00 is true, the test statistic H has an
When H is true, the test statistic H has an
approximate chi-square distribution with df
approximate chi-square distribution with df
= k-1.
= k-1.
Use a right-tailed rejection region or p-
Use a right-tailed rejection region or p-
value based on the Chi-square distribution.
value based on the Chi-square distribution.
Example
Four groups of students were randomly
assigned to be taught with four different
techniques, and their achievement test scores
were recorded. Are the distributions of test
scores the same, or do they differ in location?
             1     2    3    4
             65    75   59   94
             87    69   78   89
             73    83   67   80
             79    81   62   88
Teaching Methods
                      1         2        3        4
                      65   (3) 75   (7) 59(1)     94 (16)
                      87 (13) 69    (5) 78 (8) 89 (15)
                      73   (6) 83 (12) 67 (4) 80 (10)
                      79   (9) 81 (11) 62 (2) 88 (14)
           Ti              31       35       15       55


Rank the 16
 Rank the 16           H00:the distributions of scores are the same
                       H : the distributions of scores are the same
measurements
 measurements          Ha::the distributions differ in location
                       Ha the distributions differ in location
from 1 to 16,
 from 1 to 16,
and calculate                  12      Ti 2
       Test statistic: H =
 and calculate                       ∑      − 3(n + 1)
the four rank
 the four rank              n(n + 1) ni
sums.
 sums.                   12  312 + 352 + 152 + 552 
                     =         
                                                       − 3(17) = 8.96
                                                       
                       16(17)              4          
Teaching Methods
       H00:the distributions of scores are the same
       H : the distributions of scores are the same
       Ha::the distributions differ in location
       H the distributions differ in location
          a


                         12      Ti 2
   Test statistic: H =         ∑      − 3(n + 1)
                       n(n + 1) ni
                   12  312 + 352 + 152 + 552 
               =        
                                              − 3(17) = 8.96
                                              
                 16(17)          4           
                                      Reject H00.There is sufficient
                                       Reject H . There is sufficient
Rejection region: For aaright-
 Rejection region: For right-
tailed chi-square test with α = ..    evidence to indicate that there
                                       evidence to indicate that there
 tailed chi-square test with α =
05 and df = 4-1 =3, reject H00if H    is aadifference in test scores for
                                       is difference in test scores for
 05 and df = 4-1 =3, reject H if H
                                      the four teaching techniques.
                                       the four teaching techniques.
 ≥ 7.81.
  ≥ 7.81.
Key Concepts
I.   Nonparametric Methods
These methods can be used when the data cannot be measured on a
     quantitative scale, or when
•    The numerical scale of measurement is arbitrarily set by the
     researcher, or when
•    The parametric assumptions such as normality or constant
     variance are seriously violated.
Key Concepts
Kruskal-Wallis H Test: Completely Randomized Design
1. Jointly rank all the observations in the k samples (treat as one
   large sample of size n say). Calculate the rank sums, Ti = rank
   sum of sample i, and the test statistic
                          12      Ti 2
                  H=            ∑      − 3(n + 1)
                        n(n + 1) ni

2. If the null hypothesis of equality of distributions is false, H
   will be unusually large, resulting in a one-tailed test.
3. For sample sizes of five or greater, the rejection region for H is
   based on the chi-square distribution with (k − 1) degrees of
   freedom.

Contenu connexe

Tendances

Mann Whitney U Test And Chi Squared
Mann Whitney U Test And Chi SquaredMann Whitney U Test And Chi Squared
Mann Whitney U Test And Chi Squared
guest2137aa
 
Nonparametric methods and chi square tests (1)
Nonparametric methods and chi square tests (1)Nonparametric methods and chi square tests (1)
Nonparametric methods and chi square tests (1)
Shakeel Nouman
 

Tendances (20)

Mann Whitney U Test And Chi Squared
Mann Whitney U Test And Chi SquaredMann Whitney U Test And Chi Squared
Mann Whitney U Test And Chi Squared
 
All non parametric test
All non parametric testAll non parametric test
All non parametric test
 
Nonparametric methods and chi square tests (1)
Nonparametric methods and chi square tests (1)Nonparametric methods and chi square tests (1)
Nonparametric methods and chi square tests (1)
 
The siegel-tukey-test-for-equal-variability
The siegel-tukey-test-for-equal-variabilityThe siegel-tukey-test-for-equal-variability
The siegel-tukey-test-for-equal-variability
 
Chap15 analysis of variance
Chap15 analysis of varianceChap15 analysis of variance
Chap15 analysis of variance
 
Chi square
Chi squareChi square
Chi square
 
A Study of Some Tests of Uniformity and Their Performances
A Study of Some Tests of Uniformity and Their PerformancesA Study of Some Tests of Uniformity and Their Performances
A Study of Some Tests of Uniformity and Their Performances
 
Brown presentation
Brown presentationBrown presentation
Brown presentation
 
Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)
 
Standard deviation
Standard deviationStandard deviation
Standard deviation
 
How to Report Test Results
How to Report Test ResultsHow to Report Test Results
How to Report Test Results
 
Non-parametric analysis: Wilcoxon, Kruskal Wallis & Spearman
Non-parametric analysis: Wilcoxon, Kruskal Wallis & SpearmanNon-parametric analysis: Wilcoxon, Kruskal Wallis & Spearman
Non-parametric analysis: Wilcoxon, Kruskal Wallis & Spearman
 
Analysis of variance
Analysis of varianceAnalysis of variance
Analysis of variance
 
Hypothesis testing chi square goodness of fit test
Hypothesis testing chi square goodness of fit testHypothesis testing chi square goodness of fit test
Hypothesis testing chi square goodness of fit test
 
Nonparametric statistics ppt @ bec doms
Nonparametric statistics ppt @ bec domsNonparametric statistics ppt @ bec doms
Nonparametric statistics ppt @ bec doms
 
EDR8201 Week 3 Assignment: Analyze Central Tendency and Variability
EDR8201 Week 3 Assignment: Analyze Central Tendency and VariabilityEDR8201 Week 3 Assignment: Analyze Central Tendency and Variability
EDR8201 Week 3 Assignment: Analyze Central Tendency and Variability
 
Statistics-Non parametric test
Statistics-Non parametric testStatistics-Non parametric test
Statistics-Non parametric test
 
topology definitions
 topology definitions topology definitions
topology definitions
 
Oneway ANOVA - Overview
Oneway ANOVA - OverviewOneway ANOVA - Overview
Oneway ANOVA - Overview
 
Analysis of Variance-ANOVA
Analysis of Variance-ANOVAAnalysis of Variance-ANOVA
Analysis of Variance-ANOVA
 

En vedette

Test of hypothesis
Test of hypothesisTest of hypothesis
Test of hypothesis
vikramlawand
 

En vedette (11)

Testing of Hypothesis
Testing of Hypothesis Testing of Hypothesis
Testing of Hypothesis
 
Z test, f-test,etc
Z test, f-test,etcZ test, f-test,etc
Z test, f-test,etc
 
non parametric statistics
non parametric statisticsnon parametric statistics
non parametric statistics
 
What is a Kruskal Wallis-Test?
What is a Kruskal Wallis-Test?What is a Kruskal Wallis-Test?
What is a Kruskal Wallis-Test?
 
Wilcoxon Signed Rank Test
Wilcoxon Signed Rank Test Wilcoxon Signed Rank Test
Wilcoxon Signed Rank Test
 
What is a Wilcoxon Sign-Ranked Test (pair t non para)?
What is a Wilcoxon Sign-Ranked Test (pair t non para)?What is a Wilcoxon Sign-Ranked Test (pair t non para)?
What is a Wilcoxon Sign-Ranked Test (pair t non para)?
 
What is a Mann Whitney U?
What is a Mann Whitney U?What is a Mann Whitney U?
What is a Mann Whitney U?
 
The Chi Square Test
The Chi Square TestThe Chi Square Test
The Chi Square Test
 
Test of hypothesis
Test of hypothesisTest of hypothesis
Test of hypothesis
 
Chi square test
Chi square testChi square test
Chi square test
 
Hypothesis testing; z test, t-test. f-test
Hypothesis testing; z test, t-test. f-testHypothesis testing; z test, t-test. f-test
Hypothesis testing; z test, t-test. f-test
 

Similaire à K wtest

T12 non-parametric tests
T12 non-parametric testsT12 non-parametric tests
T12 non-parametric tests
kompellark
 
08 test of hypothesis large sample.ppt
08 test of hypothesis large sample.ppt08 test of hypothesis large sample.ppt
08 test of hypothesis large sample.ppt
Pooja Sakhla
 
Lesson06_static11
Lesson06_static11Lesson06_static11
Lesson06_static11
thangv
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
iamkim
 
C2 st lecture 10 basic statistics and the z test handout
C2 st lecture 10   basic statistics and the z test handoutC2 st lecture 10   basic statistics and the z test handout
C2 st lecture 10 basic statistics and the z test handout
fatima d
 
Chapter 6 Ranksumtest
Chapter 6  RanksumtestChapter 6  Ranksumtest
Chapter 6 Ranksumtest
ghalan
 

Similaire à K wtest (20)

T12 non-parametric tests
T12 non-parametric testsT12 non-parametric tests
T12 non-parametric tests
 
08 test of hypothesis large sample.ppt
08 test of hypothesis large sample.ppt08 test of hypothesis large sample.ppt
08 test of hypothesis large sample.ppt
 
Nonparametric and Distribution- Free Statistics
Nonparametric and Distribution- Free Statistics Nonparametric and Distribution- Free Statistics
Nonparametric and Distribution- Free Statistics
 
Parametric test
Parametric testParametric test
Parametric test
 
Lesson06_static11
Lesson06_static11Lesson06_static11
Lesson06_static11
 
ch14.ppt
ch14.pptch14.ppt
ch14.ppt
 
Nonparametric and Distribution- Free Statistics _contd
Nonparametric and Distribution- Free Statistics _contdNonparametric and Distribution- Free Statistics _contd
Nonparametric and Distribution- Free Statistics _contd
 
hypotesting lecturenotes by Amity university
hypotesting lecturenotes by Amity universityhypotesting lecturenotes by Amity university
hypotesting lecturenotes by Amity university
 
Hypothesis testing part i
Hypothesis testing part iHypothesis testing part i
Hypothesis testing part i
 
Gerstman_PP09.ppt
Gerstman_PP09.pptGerstman_PP09.ppt
Gerstman_PP09.ppt
 
Gerstman_PP09.ppt
Gerstman_PP09.pptGerstman_PP09.ppt
Gerstman_PP09.ppt
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Ppt1
Ppt1Ppt1
Ppt1
 
7 Chi-square and F (1).ppt
7 Chi-square and F (1).ppt7 Chi-square and F (1).ppt
7 Chi-square and F (1).ppt
 
Basic of Hypothesis Testing TEKU QM
Basic of Hypothesis Testing TEKU QMBasic of Hypothesis Testing TEKU QM
Basic of Hypothesis Testing TEKU QM
 
Stat2013
Stat2013Stat2013
Stat2013
 
Top schools in ghaziabad
Top schools in ghaziabadTop schools in ghaziabad
Top schools in ghaziabad
 
C2 st lecture 10 basic statistics and the z test handout
C2 st lecture 10   basic statistics and the z test handoutC2 st lecture 10   basic statistics and the z test handout
C2 st lecture 10 basic statistics and the z test handout
 
Chapter 6 Ranksumtest
Chapter 6  RanksumtestChapter 6  Ranksumtest
Chapter 6 Ranksumtest
 
Top schools in India | Delhi NCR | Noida |
Top schools in India | Delhi NCR | Noida | Top schools in India | Delhi NCR | Noida |
Top schools in India | Delhi NCR | Noida |
 

K wtest

  • 1. The Kruskal-Wallis H Test • The Kruskal-Wallis H Test is a nonparametric procedure that can be used to compare more than two populations in a completely randomized design. • All n = n1+n2+…+nk measurements are jointly ranked (i.e.treat as one large sample). • We use the sums of the ranks of the k samples to compare the distributions.
  • 2. The Kruskal-Wallis H Test Rank the total measurements in all k samples Rank the total measurements in all k samples from 1 to n. Tied observations are assigned average of from 1 to n. Tied observations are assigned average of the ranks they would have gotten if not tied. the ranks they would have gotten if not tied. Calculate Calculate T = rank sum for the ith sample ii = 1, 2,…,k Ti i = rank sum for the ith sample = 1, 2,…,k And the test statistic And the test statistic 12 Ti 2 H= ∑ − 3(n + 1) n(n + 1) ni
  • 3. The Kruskal-Wallis H Test H00:: the k distributions are identical versus H the k distributions are identical versus Haa:: at least one distribution is different H at least one distribution is different Test statistic: Kruskal-Wallis H Test statistic: Kruskal-Wallis H When H00 is true, the test statistic H has an When H is true, the test statistic H has an approximate chi-square distribution with df approximate chi-square distribution with df = k-1. = k-1. Use a right-tailed rejection region or p- Use a right-tailed rejection region or p- value based on the Chi-square distribution. value based on the Chi-square distribution.
  • 4. Example Four groups of students were randomly assigned to be taught with four different techniques, and their achievement test scores were recorded. Are the distributions of test scores the same, or do they differ in location? 1 2 3 4 65 75 59 94 87 69 78 89 73 83 67 80 79 81 62 88
  • 5. Teaching Methods 1 2 3 4 65 (3) 75 (7) 59(1) 94 (16) 87 (13) 69 (5) 78 (8) 89 (15) 73 (6) 83 (12) 67 (4) 80 (10) 79 (9) 81 (11) 62 (2) 88 (14) Ti 31 35 15 55 Rank the 16 Rank the 16 H00:the distributions of scores are the same H : the distributions of scores are the same measurements measurements Ha::the distributions differ in location Ha the distributions differ in location from 1 to 16, from 1 to 16, and calculate 12 Ti 2 Test statistic: H = and calculate ∑ − 3(n + 1) the four rank the four rank n(n + 1) ni sums. sums. 12  312 + 352 + 152 + 552  =    − 3(17) = 8.96  16(17)  4 
  • 6. Teaching Methods H00:the distributions of scores are the same H : the distributions of scores are the same Ha::the distributions differ in location H the distributions differ in location a 12 Ti 2 Test statistic: H = ∑ − 3(n + 1) n(n + 1) ni 12  312 + 352 + 152 + 552  =    − 3(17) = 8.96  16(17)  4  Reject H00.There is sufficient Reject H . There is sufficient Rejection region: For aaright- Rejection region: For right- tailed chi-square test with α = .. evidence to indicate that there evidence to indicate that there tailed chi-square test with α = 05 and df = 4-1 =3, reject H00if H is aadifference in test scores for is difference in test scores for 05 and df = 4-1 =3, reject H if H the four teaching techniques. the four teaching techniques. ≥ 7.81. ≥ 7.81.
  • 7. Key Concepts I. Nonparametric Methods These methods can be used when the data cannot be measured on a quantitative scale, or when • The numerical scale of measurement is arbitrarily set by the researcher, or when • The parametric assumptions such as normality or constant variance are seriously violated.
  • 8. Key Concepts Kruskal-Wallis H Test: Completely Randomized Design 1. Jointly rank all the observations in the k samples (treat as one large sample of size n say). Calculate the rank sums, Ti = rank sum of sample i, and the test statistic 12 Ti 2 H= ∑ − 3(n + 1) n(n + 1) ni 2. If the null hypothesis of equality of distributions is false, H will be unusually large, resulting in a one-tailed test. 3. For sample sizes of five or greater, the rejection region for H is based on the chi-square distribution with (k − 1) degrees of freedom.