Difference between revisions of "Manuals/calci/MANNWHITNEYUTEST"

From ZCubes Wiki
Jump to navigation Jump to search
Line 33: Line 33:
 
==Example==
 
==Example==
 
{| class="wikitable"
 
{| class="wikitable"
|+Spreadsheet
+
|+
 +
| X || Y
 
|-
 
|-
! !! A !! B 
+
| 87 || 71
 
|-
 
|-
! 1
+
| 72 || 42
| 20 || 22 
 
 
|-
 
|-
! 2
+
| 94 || 69
| 15 || 17
 
 
|-
 
|-
! 3
+
| 49 || 97
| 25 || 19 
 
 
|-
 
|-
! 4
+
| 56 || 78
| 35 || 38
 
 
|-
 
|-
!5
+
| 88 || 84
| 17 || 16
+
|-
 +
| 74 || 57
 +
|-
 +
| 61 || 64
 +
|-
 +
| 80 || 78
 +
|-
 +
| 52 || 73
 +
|-
 +
| 75 || 85
 +
|-
 +
| 0 || 91
 +
|}
 +
 
 +
#=MANNWHITNEYUTEST(A1:A12,B1:B13,0.05,true)
 +
 
 +
{| class="SpreadSheet " id="TABLE1" rcid="TABLE1" title="TABLE1" style="width: auto; position: relative; height: auto;"
 +
|+
 +
|+ Mann Whitney U Test
 +
Ranks
 +
 
 +
|- class="even" r="1" style="position: relative;" |
 +
| c="A" style="position: relative; overflow: visible; width: 28px;" | X
 +
| c="B" style="position: relative; overflow: visible; width: 49px;" | Y
 +
 
 +
|- class="odd" r="2"
 +
| style="width: 26px;" | 19
 +
| style="width: 49px;" | 9
 +
 
 +
|- class="even" r="3"
 +
| style="width: 26px;" | 10
 +
| style="width: 49px;" | 1
 +
 
 +
|- class="odd" r="4"
 +
| style="width: 26px;" | 22
 +
| style="width: 49px;" | 8
 +
 
 +
|- class="even" r="5"
 +
| style="width: 26px;" | 2
 +
| style="width: 49px;" | 23
 +
 
 +
|- class="odd" r="6"
 +
| style="width: 26px;" | 4
 +
| style="width: 49px;" | 14.5
 +
 
 +
|- class="even" r="7"
 +
| style="width: 26px;" | 20
 +
| style="width: 49px;" | 17  
 +
 
 +
|- class="odd" r="8"
 +
| style="width: 26px;" | 12
 +
| style="width: 49px;" | 5
 +
 
 +
|- class="even" r="9"
 +
| style="width: 26px;" | 6
 +
| style="width: 49px;" | 7
 +
 
 +
|- class="odd" r="10"
 +
| style="width: 26px;" | 16  
 +
| style="width: 49px;" | 14.5
 +
 
 +
|- class="even" r="11"
 +
| style="width: 26px;" | 3
 +
| style="width: 49px;" | 11
 +
 
 +
|- class="odd" r="12"
 +
| style="width: 26px;" | 13
 +
| style="width: 49px;" | 18
 +
 
 +
|- class="even" r="13"
 +
| style="width: 26px;" | 0
 +
| style="width: 49px;" | 21
 +
 
 +
|}
 +
 
 +
{| class="SpreadSheet notepad" id="TABLE7" rcid="TABLE7" title="TABLE7" style="width: auto; position: relative; height: auto;" |
 +
|+
 +
 
 +
|- class="even" r="1" style="position: relative;" |
 +
| c="A" style="position: relative; overflow: visible; width: 58px;" | Ranks
 +
| c="B" style="position: relative; overflow: visible; width: 27px;" | 127
 +
| c="C" style="position: relative; overflow: visible; width: 31px;" | 149
 +
 
 +
|- class="odd" r="2"
 +
| style="width: 58px;" | Median
 +
| style="width: 27px;" | 74
 +
| style="width: 31px;" | 75.5
 +
 
 +
|- class="even" r="3"
 +
| style="width: 58px;" | n
 +
| style="width: 27px;" | 11
 +
| style="width: 31px;" | 12
 +
 
 +
|}
 +
 
 +
{| class="SpreadSheet notepad" id="TABLE8" rcid="TABLE8" title="TABLE8" style="width: auto; position: relative; height: auto;" |
 +
|+
 +
RESULTS
 +
 
 +
|- class="even" r="1" style="position: relative;" |
 +
| c="A" style="position: relative; overflow: visible; width: 54px;" |
 +
 
 +
|- class="odd" r="2"
 +
| style="width: 54px;" | U1
 +
| style="width: 161px;" | 71
 +
 
 +
|- class="even" r="3"
 +
| style="width: 54px;" | U2
 +
| style="width: 161px;" | 61
 +
 
 +
|- class="odd" r="4"
 +
| style="width: 54px;" | U
 +
| style="width: 161px;" | 61
 +
 
 +
|- class="even" r="5"
 +
| style="width: 54px;" | E(U1)
 +
| style="width: 161px;" | 132
 +
 
 +
|- class="odd" r="6"
 +
| style="width: 54px;" | E(U2)
 +
| style="width: 161px;" | 144
 +
 
 +
|- class="even" r="7"
 +
| style="width: 54px;" | E(U)
 +
| style="width: 161px;" | 66
 +
 
 +
|- class="odd" r="8"
 +
| style="width: 54px;" | StdDev
 +
| style="width: 161px;" | 16.24807680927192
 +
 
 +
|- class="even" r="9"
 +
| style="width: 54px;" | a
 +
| style="width: 161px;" | 0.05
 +
 
 +
|- class="odd" r="10"
 +
| style="width: 54px;" | z
 +
| style="width: 161px;" | -0.3077287274483318
 +
 
 +
|- class="even" r="11"
 +
| style="width: 54px;" | p
 +
| style="width: 161px;" | 0.7582891742833224
 +
 
 
|}
 
|}
=MANNWHITNEYUTEST(A1:A5,B1:B5,0.05,TRUE)
 

Revision as of 13:57, 6 May 2015

MANNWHITNEYUTEST(xRange,yRange,Confidencelevel,Logicalvalue,Testtype)


  • is the array of x values.
  • is the array of y values.
  • is the value between 0 and 1.
  • is either TRUE or FALSE.
  • is the type of the test.

Description

  • This function gives the test statistic value of the Mann Whitey U test.
  • It is one type of Non parametric test.It is also called Mann–Whitney–Wilcoxon,Wilcoxon rank-sum test or Wilcoxon–Mann–Whitney test.
  • Using this test we can analyze rank-ordered data.
  • This test is alternative to the independent-sample, Student t test, and yields results identical to those obtained from the Wilcoxon Two Independent Samples Test.
  • This test is used to compare differences between two independent groups when the dependent variable is either ordinal or continuous, but not normally distributed.
  • Mann whitey u test is having the following properties:
  • 1.Data points should be independent from each other.
  • 2.Data do not have to be normal and variances do not have to be equal.
  • 3.All individuals must be selected at random from the population.
  • 4.All individuals must have equal chance of being selected.
  • 5.Sample sizes should be as equal as possible but for some differences are allowed.
  • Suppose the two groups of the populations have distributions with the same shape it can be viewed as a comparison of two medians.With out the assumption the Mann-Whitney test does not compare medians.
  • To find statistic value of this test the steps are required:
    • 1.For the two observations of values, find the rank all together.
    • 2.Add up all the ranks in a first observation.
    • 3.Add up all the ranks in a second group.
    • 4.Select the larger rank.
    • 5.Calculate the number of participants,number of people in each group.
    • 6.Calculate the test statistic:
  • where and are number of participants and number of people.
  • is the larger rank total. is the similar value of .
    • 7.State Result: In this step we have to take a decision of null hypothesis either accept or reject depending on the z value using critical value table.
    • 8.State Conclusion: To be significant, our obtained U has to be equal to or LESS than this critical value.

Example

X Y
87 71
72 42
94 69
49 97
56 78
88 84
74 57
61 64
80 78
52 73
75 85
0 91
  1. =MANNWHITNEYUTEST(A1:A12,B1:B13,0.05,true)
Mann Whitney U Test Ranks
X Y
19 9
10 1
22 8
2 23
4 14.5
20 17
12 5
6 7
16 14.5
3 11
13 18
0 21
Ranks 127 149
Median 74 75.5
n 11 12
RESULTS
U1 71
U2 61
U 61
E(U1) 132
E(U2) 144
E(U) 66
StdDev 16.24807680927192
a 0.05
z -0.3077287274483318
p 0.7582891742833224