Counting U Test for Mann-Whitney Test & Finding Z Value

  • Context: Undergrad 
  • Thread starter Thread starter Drudge
  • Start date Start date
  • Tags Tags
    Test
Click For Summary
SUMMARY

The discussion focuses on calculating the U statistic for the Mann-Whitney U test and deriving the Z value from it. The U statistic is computed using the formula: U = n(1) * n(2) + (n(1) * [n(2) + 1])/2 - R, where R is the sum of ranks for one of the samples. The participants clarify that the Z value can be approximated using tables, specifically referencing the PDF from the University of Saskatchewan. The main issue raised is the discrepancy in the calculated U value, with the correct U value being 214, while the participant calculated 174.

PREREQUISITES
  • Understanding of the Mann-Whitney U test
  • Familiarity with rank-based statistics
  • Knowledge of hypothesis testing and null hypothesis
  • Ability to interpret statistical tables and Z values
NEXT STEPS
  • Learn how to calculate ranks for tied data in the Mann-Whitney U test
  • Study the derivation of Z values from U statistics in non-parametric tests
  • Explore the use of online calculators for Mann-Whitney U tests
  • Review statistical significance and its interpretation in hypothesis testing
USEFUL FOR

Statisticians, data analysts, researchers conducting non-parametric tests, and students preparing for exams in statistics will benefit from this discussion.

Drudge
Messages
30
Reaction score
0
Could some one tell me how to count a U test? I can´t find it anywhere!

So I know you rank the values from smallest to biggest across each sample (if that makes any sense to you) and then you count the ranks together and use the following equation:

U = n(1) * n(2) + ( n(1) * [ n(2) + 1])/2 - R

hope that makes sense. I do not know how to write proper equations. However, it is the samples n multiplied + the samples multiplied (and the other +1) and divided by 2, and finally - R, which is the sum of ranks of x(1) I think.

So then you are supposed to look up on a U-test table and check if U or U(1) is smaller than the critical number, and if so then you rule out Null hypothesis that they are the same.

So I am sure anyone who knows this, knows what I am talking about.

So my question is about how do you get the Z value from this? My book requires it, but does not explain how to. Also online calculators (such as http://www.vassarstats.net/utest.html ) give you the z value.
 
Last edited:
Physics news on Phys.org
chiro said:
Hey Drudge.

The table will look something like this:

http://math.usask.ca/~laverty/S245/Tables/wmw.pdf

Take a look at the PDF for obtaining a Z-value approximation statistic.

Ok thank you.

What is U for the following data?

2, 0, 6, 1, 8, 4, 3, 2, 5, 4, 5, 3, 1, 7, 6, 5, 4, 5, 5, 4

7, 8, 3, 6, 6, 7, 3, 4, 3, 5, 8, 6, 9, 2, 4, 5

When I enter these into http://www.vassarstats.net/utest.html I get U(a) to be 214.

Now I understood that U is the sum of ranks - the two n...( as stated in my first post). This way i get 174, when it should be 214, which when put into the z-equation at http://math.usask.ca/~laverty/S245/Tables/wmw.pdf gives the right answer.

why am I not getting the right value to calculate U (and therefore z)?

EDIT: to clarify, I rank all the data, in the same way as the calculator at the above mentioned site,( so they should be correct), then I add up all the ranks together from the first column (data where n = 20) and I get 316, then I use the equation in my first post and get 174, when I should be getting 214 apparently
 
Last edited:
Just for clarification, are you trying to calculate the median of your data?
 
chiro said:
Just for clarification, are you trying to calculate the median of your data?

I think that is what the U-test tries for, no?

I am studying a statistic book for an exam. There is a problem there as such:

Two groups (<40 & 40<) are measured for the amount of hours they utilize medical services. The results in hours are given respectively in the data I posted last.

Problem: test, do the groups differ with a U test

(answer = U [this means z] = -1,72. This answer you can get from the eqaution you provided in your previous post if you use the U value of 214 of 106 (that is 20(n) * 16(n) - 214).

In my book the only instructions are that you count up the sum of ranks, then you apply the appropriate eqaution and you get U. It does not tell you how to get z however. All well and good though, you can get it when you use the equation that you said, so great.

Why can I not get the right U value? Am I doing something wrong? If you were to count the whole problem from the raw data I gave in my previous post, what would you do different to what I have now explained, and is it something I am doing wrong are what is uP?
 
If you want to make it easier for the readers, you might want to tell us what the median and then give us the rankings for each of the observations.

Note that a rank for an observation is the number of below-ranked observations that appear before the upper-ranked observations.
 
chiro said:
Note that a rank for an observation is the number of below-ranked observations that appear before the upper-ranked observations.

I Do not understand

chiro said:
If you want to make it easier for the readers, you might want to tell us what the median and then give us the rankings for each of the observations.

DATA:

2, 0, 6, 1, 8, 4, 3, 2, 5, 4, 5, 3, 1, 7, 6, 5, 4, 5, 5, 4

7, 8, 3, 6, 6, 7, 3, 4, 3, 5, 8, 6, 9, 2, 4, 5

RANKS(respectively):

5, 1, 27, 2.5, 34, 14.5, 9, 5, 21, 14.5, 21, 9, 2.5, 31, 27, 21, 14.5, 21, 21, 14.5 (= 316)

31, 34, 9, 27, 27, 31, 9, 14.5, 9, 21, 34, 27, 36, 5, 14.5, 21 (= 350)

U = 20 * 16 +\frac{20 * (16+1)}{2} -316 = 174
 
Last edited:
For the data point 2 you have 0 and 1 and totaling these gives (0,0,1) which is 3 instead of 2. How have you calculated the ranks?
 
chiro said:
For the data point 2 you have 0 and 1 and totaling these gives (0,0,1) which is 3 instead of 2. How have you calculated the ranks?

Gosh, I have no idea what you mean.

I place each row into a column. Then, beginning from the smallest of each column (this case 0) I begin to rank values ( 0 is smallest so it is 1). For tied ranks I add up the ranks, say, in row 1 there was two 1`s so there ranks would be 2 and 3, and 2 + 3/2 is 2.5, so I rank both numbers with 2.5.

Then there are three 2`s, so, ( 4 + 5 + 6 ) / 3 = 5, and therefore I rank each 2 with a 5 and so on...
 
  • #10
I might mention that whatever I am doing (wrong) seems to be sufficient enough (according to the answer sheets in my books), when there are no tied data. Since there is no elaboration what to do with tied data in my book, I assume I am missing something that has to do with that, maybe?

By the way, what does the z-value from a U-test indicate? Is it not a normal distribution parameter? what could it have to do with a U-test? To indicate significance?
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
20
Views
2K
Replies
1
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K