# Appropriateness of K-S test and Kruskal-Wallis for assessing medical data set

I am analyzing some stats for a paper I am writing. I have statistics help available through my faculty but am not there for a couple of months so hoping you can help out.

n = 463, 2 patient groups( <70 & >= 70 years). Using SPSS.

I have assessed a whole bunch of stats using Pearson's $\chi^2$ test - They are categorical such as Smoking History (T/F), Smoking Current (T/F), BMI>30, Diabetes,etc. So far so good (Unless anyone can tell me if this is an inappropriate test?)

I have more variables such as Pre-operative Creatine, ICU hours stay, etc., which are not normally distributed (I used to know how to test for normality 'properly' but I have just drawn Q-Q plots and seen if they are on the line and they aren't. My intention was to use student's t but my rusty stats knowledge tells me I can't now because they aren't normally distributed.

In many aspects I am using the statistical methods of a friend that wrote a similar paper using a similar dataset, and for his continuous variables he used Kolmogorov-Smirnov but I'm not sure if he just used this for normality. He then says that he used Kruskal-Wallis to assess these variables but I can't work out why this is appropriate.

Would someone mind explaining to me if these tests are appropriate for comparing these samples?

1) Only assess normality for the cases where you assume it. (I don't think this is an issue in your case, but it's a common problem so it bears mentioning.)

2) When checking a normality assumption, a Q-Q plot is a better idea than a formal hypothesis test - hypothesis tests don't actually answer the relevant question.

3) The Kruskal-Wallis test is the nonparametric rank-based equivalent to a one-way ANOVA. The Kruskal-Wallis is to the Wilcoxon-Mann-Whitney two-sample test as one-way ANOVA is to a two-sample t-test. It is used when you want to test against the null that more than two groups have the same location.

Hope this helps some.

--

If you want to test specifically for a difference in means, neither the K-S test nor the W-M-W really does it (though with some additional assumptions the W-M-W is also a test for a difference in means).

The best way to test for a difference in means is probably to do a permutation test, as long as the distributions would be the same under the null (so if your alternative is a location-shift, you're basically assuming identical shapes apart from location).

The one-sample K-S test is a test for a fully specified distribution - it can test any continuous distribution you can give the pdf for -- you would NOT use that to test the normality of data because unless you know the population parameters, the distribution isn't fully specified... and if you knew the population parameters, you would not need to test the means! You could use a Smirnov test (a two sample K-S test) to test for any kind of difference between the two groups, but if your interest is a difference in means it's not a very powerful test.

Your confusion about what is being tested with K-S may be because you're muddling the two (the one and two-sample tests) together - they're used for different things.

Yes, a Kruskal-Wallis applied to two samples would give the same result as a Wilcoxon-Mann-Whitney for a two-tailed test (i.e. it doesn't allow a one-sided alternative, in the same way that a one-way ANOVA doesn't give you the one-sided alternative you can get with a two-sample t-test and a chi-square doesn't give the one-sided alternative of a two-sample proportions test).

• Thanks for your advice. So essentially if I have 2 samples drawn from a population (In this case my over 70s and under 70s), I could use either Kommogorov-Smirnov or Kruskal-Wallis (Which, for 2 samples, would be the same as Wilcoxon-Mann-Whitney)? Or should you oinly use K-S when you are testing for normality.... (Actually I don't understand the proper case in which to use this test) and use K-W/W-M-W if I am testing for means etc? Thanks again Nov 12, 2012 at 11:53
• I've moved my response up into the answer above because it's too long for a comment. Nov 12, 2012 at 22:36