Difference between revisions of "Manuals/calci/KRUSKALWALLISTEST"

From ZCubes Wiki
Jump to navigation Jump to search
 
(24 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<div style="font-size:25px">'''KRUSKALWALLISTEST(Array,Confidencelevel,Logicalvalue)'''</div><br/>
+
<div style="font-size:25px">'''KRUSKALWALLISTEST (SampleDataByGroup,ConfidenceLevel,NewTableFlag)'''</div><br/>
*<math>Array</math> is the set of  values to find the test statistic.
+
*<math>SampleDataByGroup</math> is the set of  values to find the test statistic.
 
*<math>Confidencelevel</math> is the value between 0 and 1.
 
*<math>Confidencelevel</math> is the value between 0 and 1.
*<math>Logicalvalue</math> is either TRUE or FALSE.
+
*<math>NewTableFlag</math> is either TRUE or FALSE.
 +
 
  
 
==Description==
 
==Description==
Line 34: Line 35:
 
**6.State Results:In this step we have to take a decision of null hypothesis either accept or reject depending on the  critical value table.
 
**6.State Results:In this step we have to take a decision of null hypothesis either accept or reject depending on the  critical value table.
 
**7.State Conclusion:To be significant, our obtained H has to be equal to or LESS than this critical value.
 
**7.State Conclusion:To be significant, our obtained H has to be equal to or LESS than this critical value.
 +
==Examples==
  
==Example==
+
{| class="wikitable"
{| class="SpreadSheet notepad" id="TABLE4_D1" rcid="TABLE4_D1" title="TABLE4_D1" style="width: auto; position: relative; height: auto;"  
+
|+SPREADSHEET
|+  
+
|-
Raw Scores
+
!  !! A !! B !! C
 
+
|-
 
+
! 1  
 
+
| '''New''' || '''Old''' || '''Control'''
|- class="even" r="1" style="position: relative;"
+
|-
| c="A" style="position: relative; overflow: visible; width: 69px;" Method1
+
! 2
 
+
| 27 || 22.5 || 3
| c="B" style="position: relative; overflow: visible; width: 71px;" Method2
+
|-
 
+
! 3
| c="C" style="position: relative; overflow: visible; width: 70px;" Method3
+
| 12.5 || 11 || 24.5
 
+
|-
 
+
! 4
 
+
| 19 || 8 || 14 
 
+
|-
|- class="odd" r="2"
+
! 5
| style="width: 69px;" 94
+
| 26 || 5.5 || 4
 
+
|-
| style="width: 71px;" 82
+
! 6
 
+
| 15 ||9.5 || 7
| style="width: 70px;" 89
+
|-
 
+
! 7
 
+
| 20 || 9.5 || 2
|- class="even" r="3"
+
|-
| style="width: 69px;" 87
+
! 8
 
+
| 16 || 12.5 || 22.5
| style="width: 71px;" 85
+
|-
 
+
! 9
| style="width: 70px;" 68
+
| 21 || 1 ||5.5
 
+
|-
 
+
! 10
|- class="odd" r="4"
+
| 24.5 || 17 ||
| style="width: 69px;" 90
+
|-
 
+
! 11
| style="width: 71px;" 79
+
| 18 || ||  
 
+
|}
| style="width: 70px;" 72
 
 
 
 
 
|- class="even" r="5"
 
| style="width: 69px;" 74
 
 
 
| style="width: 71px;" 84
 
 
 
| style="width: 70px;" 76
 
 
 
  
|- class="odd" r="6"
+
=KRUSKALWALLISTEST([A2:A11,B2:B10,C2:C9],0.05,0)
| style="width: 69px;" 86
 
  
| style="width: 71px;" 61
 
  
| style="width: 70px;" 69
+
{| class="wikitable"
 +
|+KRUSKAL WALLIS TEST RANKING
 +
|-
 +
!  !! A !! B !! C
 +
|-
 +
! 1
 +
| '''GROUP-0''' || '''GROUP-1''' || '''GROUP-2'''
 +
|-
 +
! 2
 +
| 27 || 22.5 || 3
 +
|-
 +
! 3
 +
| 12.5 || 11 || 24.5
 +
|-
 +
! 4
 +
| 19 || 8 || 14 
 +
|-
 +
! 5
 +
| 26 || 5.5 || 4
 +
|-
 +
! 6
 +
| 15 ||9.5 || 7
 +
|-
 +
! 7
 +
| 20 || 9.5 || 2
 +
|-
 +
! 8
 +
| 16 || 12.5 || 22.5
 +
|-
 +
! 9
 +
| 21 || 1 ||5.5
 +
|-
 +
! 10
 +
| 24.5 || 17 || undefined
 +
|-
 +
! 11
 +
| 18 || undefined || undefined
 +
|}
  
  
|- class="even" r="7"  
+
{| class="wikitable"
| style="width: 69px;" 97
+
|+TEST RESULTS
 +
|-
 +
! !!GROUP-0 !! GROUP-1 !! GROUP-2
 +
|-
 +
| SUM OF RANKS || 199 || 96.5 || 82.5
 +
|-
 +
| GROUP SIZE || 10 || 9 || 8
 +
|-
 +
| R^2/N || 3960.1 || 1034.6944444444443 || 850.78125
 +
|-
 +
| TOTALRANKSUM || 378
 +
|-
 +
| TOTAL GROUP SIZE || 27
 +
|-
 +
| TOTAL R^2/N || 5845.575694444444
 +
|-
 +
| H || 8.78691578483243
 +
|-
 +
| DF || 2
 +
|-
 +
| P-VALUE || 0.012357922885420258
 +
|-
 +
| A || 0.05
 +
|}
  
| style="width: 71px;" 72
+
==Related Videos==
  
| style="width: 70px;" 65
+
{{#ev:youtube|KmVTkVnWFuc|280|center|Kruskal Wallis Test}}
  
 +
==See Also==
 +
*[[Manuals/calci/LEVENESTEST| LEVENESTEST]]
 +
*[[Manuals/calci/MOODSMEDIANTEST| MOODSMEDIANTEST]]
 +
*[[Manuals/calci/RIEMANNZETA| RIEMANNZETA]]
  
|- class="odd" r="8"
+
==References==
| style="width: 69px;" 0
 
  
| style="width: 71px;" 80  
+
*[http://en.wikipedia.org/wiki/Kruskal%E2%80%93Wallis_one-way_analysis_of_variance Kruskal-Wallis test documentation on Wikipedia]
 +
*[http://www.stat.vcu.edu/help/SPSS/SPSS.KruskalWallis.PC.pdf Kruskal-Wallis test in SPSS]
  
| style="width: 70px;" 0
 
  
  
|}
+
*[[Z_API_Functions | List of Main Z Functions]]
  
=KRUSKALWALLISTEST(A1:C5,0.05,TRUE)
+
*[[ Z3 |  Z3 home ]]

Latest revision as of 15:11, 11 August 2020

KRUSKALWALLISTEST (SampleDataByGroup,ConfidenceLevel,NewTableFlag)


  • is the set of values to find the test statistic.
  • is the value between 0 and 1.
  • is either TRUE or FALSE.


Description

  • This function gives the test statistic value of the Kruskal Wallis test.
  • It is one type of Non parametric test.
  • It is a logical extension of the Wilcoxon-Mann-Whitney Test.
  • The parametric equivalent of the Kruskal-Wallis test is the one-way analysis of variance (ANOVA).
  • This test is used for comparing more than two sample that are independent or not related.
  • It is used to test the null hypothesis that all populations have identical distribution functions against the alternative hypothesis that at least two of the samples differ only with respect to Median.
  • Kruskal–Wallis is also used when the examined groups are of unequal size.
  • When the Kruskal-Wallis test leads to significant results, then at least one of the samples is different from the other samples.
  • The test does not identify where the differences occur or how many differences actually occur.
  • Since it is a non-parametric method, the Kruskal–Wallis test does not assume a normal distribution of the residuals, unlike the analogous one-way analysis of variance.
  • However, the test does assume an identically shaped and scaled distribution for each group, except for any difference in medians.
  • The Kruskal Wallis test data are having the following properties:
  • 1.The data points must be independent from each other.
  • 2.The distributions do not have to be normal and the variances do not have to be equal.
  • 3.The data points must be more than five per sample.
  • 4.All individuals must be selected at random from the population.
  • 5.All individuals must have equal chance of being selected.
  • 6.Sample sizes should be as equal as possible but some differences are allowed.
  • Steps for Kruskal Wallis Test:
    • 1. Define Null and Alternative Hypotheses:
  • Null Hypotheses:There is no difference between the conditions.
  • Alternative Hypotheses:There is a difference between the conditions.
    • 2.State Alpha:Alpha=0.05.
    • 3.Calculate degrees of freedom:df = k – 1, where k = number of groups.
    • 4.State Decision Rule:From the Chi squared table calculate the critical value.
  • Suppose the is greater than the critical value then reject the null hypothesis
    • 5.Calculate the Test Statistic:
    • 6.State Results:In this step we have to take a decision of null hypothesis either accept or reject depending on the critical value table.
    • 7.State Conclusion:To be significant, our obtained H has to be equal to or LESS than this critical value.

Examples

SPREADSHEET
A B C
1 New Old Control
2 27 22.5 3
3 12.5 11 24.5
4 19 8 14
5 26 5.5 4
6 15 9.5 7
7 20 9.5 2
8 16 12.5 22.5
9 21 1 5.5
10 24.5 17
11 18
=KRUSKALWALLISTEST([A2:A11,B2:B10,C2:C9],0.05,0)


KRUSKAL WALLIS TEST RANKING
A B C
1 GROUP-0 GROUP-1 GROUP-2
2 27 22.5 3
3 12.5 11 24.5
4 19 8 14
5 26 5.5 4
6 15 9.5 7
7 20 9.5 2
8 16 12.5 22.5
9 21 1 5.5
10 24.5 17 undefined
11 18 undefined undefined


TEST RESULTS
GROUP-0 GROUP-1 GROUP-2
SUM OF RANKS 199 96.5 82.5
GROUP SIZE 10 9 8
R^2/N 3960.1 1034.6944444444443 850.78125
TOTALRANKSUM 378
TOTAL GROUP SIZE 27
TOTAL R^2/N 5845.575694444444
H 8.78691578483243
DF 2
P-VALUE 0.012357922885420258
A 0.05

Related Videos

Kruskal Wallis Test

See Also

References