# Thread: Comparing two groups - best test to use?

1. ## Comparing two groups - best test to use?

Hi all,

I have two sets of data - hospital admission lengths (measured in whole hours) grouped in to 'younger patients' and 'older patients'. There are over 100 individuals/entries in each group and each group is independent. Both sets of data are skewed, neither exhibiting a normal distribution (on histogram). Medians (which differ between groups) are a better measure than mean (I have outliers that need to be kept). I want to ascertain whether there is a difference in length of stay between the two groups.

My issues:
1. How do I formally ascertain the shape of each group to know whether a Mann Whitney U test is appropriate? If it is, would it be sensible to use in view of my outliers?
2. If shape is not similar, which test is the best to use to compare the two groups?

AbnormallyDistributed (Excel user)

2. ## Re: Comparing two groups - best test to use?

I would use MW test.

3. ## The Following User Says Thank You to gianmarco For This Useful Post:

AbnormallyDistributed (08-29-2016)

4. ## Re: Comparing two groups - best test to use?

Originally Posted by gianmarco
I would use MW test.
I would not!

Originally Posted by gianmarco
Of course I don't agree about what Gianmarco [who is a great person] is saying there. In that link the question is different. Maybe I will write a reply when my fever is gone.

5. ## The Following User Says Thank You to GretaGarbo For This Useful Post:

AbnormallyDistributed (08-29-2016)

6. ## Re: Comparing two groups - best test to use?

@Greta: the question is different; still, the ways in which MW test can be conceived hold true for this new question as well.
As far as the OP is Happy to test whether the values in one group tend to be larger than the values of the other group, I believe he can actually use MW (which allows to get some other useful measures of effect size as well, as described in that earlier post).

(You're a great and helpful person too)

7. ## The Following User Says Thank You to gianmarco For This Useful Post:

AbnormallyDistributed (08-29-2016)

8. ## Re: Comparing two groups - best test to use?

GretaGarbo - what are your reservations?

9. ## Re: Comparing two groups - best test to use?

If you actually think that the median is the best measure
of central tendency here, und you want to compare groups
in this respect, then the median test could be used. The
test is less powerful than t-test or U-test, but with n=200
power should still be large enough here. The interpretation
of results would be straightforward, in contrast to Mann-
Whitney.

With kind regards

Karabiner

10. ## The Following 2 Users Say Thank You to Karabiner For This Useful Post:

AbnormallyDistributed (08-29-2016), GretaGarbo (08-29-2016)

11. ## Re: Comparing two groups - best test to use?

Originally Posted by gianmarco
As far as the OP is Happy to test whether the values in one group tend to be larger than the values of the other group, I believe he can actually use MW
@Gianmarco,
Maybe the OP is happy with the model, but would you be happy with that? The model says that the average or median hospital admission lengths suddenly jumps up to a higher level as the person passes the break point of going from "young" to "old". That is what the model says. Is that really reasonable?

Isn't it more natural to think of age as an independent variable in a regression model, possibly with squared terms? Or to model Age with a generalized additive model (gam) so that the age effect can be gradually smoothed with local splines (and the OP can get a nice diagram)?

And I want to thank Karabiner. I was not aware or the median test. (It seems to be about using a chi-squared test. That sounds kind of familiar. )

12. ## The Following User Says Thank You to GretaGarbo For This Useful Post:

AbnormallyDistributed (08-29-2016)

13. ## Re: Comparing two groups - best test to use?

Originally Posted by Karabiner
The interpretation
of results would be straightforward, in contrast to Mann-
Whitney.
What's wrong with the interpretation of MW?

14. ## The Following User Says Thank You to gianmarco For This Useful Post:

AbnormallyDistributed (08-29-2016)

15. ## Re: Comparing two groups - best test to use?

Originally Posted by AbnormallyDistributed
I want to ascertain whether there is a difference in length of stay between the two groups.
That research question is perfectly fit to MW test, again in its 'broad' interpretation: i.e., is there a tendency for hospital admission lenght of younger people to score higher than the hospital admission lenght of older people?

As for the median test:
Should the Median Test be Retired from General Use?
"Although several authors have indicated that the median test has low power in small samples, it continues to be presented in many statistical textbooks, included in a number of popular statistical software packages, and used in a variety of application areas. We present results of a power simulation study that shows that the median test has noticeably lower power, even for the double exponential distribution for which it is asymptotically most powerful, than other readily available rank tests. We suggest that the median test be "retired" from routine use and recommend alternative rank tests that have superior power over a relatively large family of symmetric distributions."

Boris Freidlin and Joseph L. Gastwirth
The American Statistician Vol. 54, No. 3 (Aug., 2000), pp. 161-164
http://www.jstor.org/stable/2685584

16. ## The Following 2 Users Say Thank You to gianmarco For This Useful Post:

AbnormallyDistributed (08-29-2016), GretaGarbo (08-29-2016)

17. ## Re: Comparing two groups - best test to use?

Originally Posted by gianmarco
That research question is perfectly fit to MW test, again in its 'broad' interpretation: i.e., is there a tendency for hospital admission lenght of younger people to score higher than the hospital admission lenght of older people?
Yes, the OP is happy with that, but are you happy with that, Gianmarco?

18. ## The Following User Says Thank You to GretaGarbo For This Useful Post:

AbnormallyDistributed (08-29-2016)

19. ## Re: Comparing two groups - best test to use?

I am always happy :-)

20. ## The Following 2 Users Say Thank You to gianmarco For This Useful Post:

AbnormallyDistributed (08-29-2016), GretaGarbo (08-29-2016)

21. ## Re: Comparing two groups - best test to use?

Hi all,

Lots of discussion! Thank you.

Greta - what would you suggest as an alternative? At this stage I'm happy with an outcome that comments on the difference between the two groups as they are. Basic analysis is ok for my current purpose.

Karabiner (or others) - how can I run a median test? Excel doesn't seem to have a way. Any online calculators you can suggest? I've tried one but have no way of knowing if it's reliable (http://www.fon.hum.uva.nl/Service/St...dian_Test.html) - I have A 156, B 111, Median 12, p= .0614 (median of group A is 11 (range 4-360), median of group B is 21 (range 5-224)). Unfortunately I don't currently have access to any other statistical software.

GianMarco - I've run the Mann Whitney and included those results ((U = 7505, Z = -1.85, p = .06). Thanks.

Thanks again,

22. ## Re: Comparing two groups - best test to use?

Originally Posted by gianmarco
What's wrong with the interpretation of MW?
Nothing is wrong, generally speaking. But I was referring to the idea that the OP was interested in comparing medians. M-W (or Wilcoxon rank sum test) does not compare medians.

With kind regards

K.

23. ## The Following 2 Users Say Thank You to Karabiner For This Useful Post:

AbnormallyDistributed (08-29-2016), GretaGarbo (08-29-2016)

24. ## Re: Comparing two groups - best test to use?

An even simpler approach would be plotting two notched boxplots (there should be an online facility somewhere in the web), and see if the notches overlap. If they DO NOT overlap, there is a significant difference in median (provided that you want to stick with focusing in the medians).
You may want to refer to this article (as for notched boxplot):
Points of Significance: Visualizing samples with box plots

Cheers

EDIT:
boxplot online facility: http://boxplot.tyerslab.com/

25. ## The Following 2 Users Say Thank You to gianmarco For This Useful Post:

AbnormallyDistributed (08-29-2016), GretaGarbo (09-02-2016)

26. ## Re: Comparing two groups - best test to use?

Thanks for that.

Median test and MW both had p values >.05. The notched box plot (different website to the one you suggested: http://wessa.net/rwasp_notchedbox1.wasp) shows no overlap. What are the possible explanations for the differences in results?