Hi Everybody, I'm trying to do some hypotheses testing in R and I have problems with interpretation of results. I have two data sets: x<-c(2,1,1,2,2,3,2,2,1,2,2,4,1,2,4,1,1,5,2,1,4,2,2,1,1,2,2,1) y<-c(2,2,1,1,2,2,1,4,1,4,2,4,4,4,3,2,4,4,3,2,4,5)

according to the KS test they come from the same distribution: ks.test(x,y) If they come from the same distribution all the characteristics (mean, median, ... ) should be the same. However, Wicoxon and Kruskal tests indicate that their null hypothesis should be rejected

wilcox.test(x,y)kruskal.test(list(x,y))

Now, I am puzzled with the outcome of the test. I can simply imagine a situation when Wilcox and Kruskal tests indicate that their null hypothesis should be accepted but the KS test can indicate that samples comes from different distributions. Here, it is the other way round. Does any one has some hints what causes the problems? Best,

Gruppo________________________________

My Comment

Till yesterday I did suppose that all indication of rank statistics regarding the Two-sample Kolmogorov-Smirnov Test was complete idiotic. Facing the following Richard Ulrich?s response I?m not so sure . . .(Irony?s somewhat a lighter way to disapprove . . . I mean. Christmas Time . . .)

>On Dec 22, 5:22 pm, czytaczg...@gmail.com wrote: >> [...]>>>> according to the KS test they come from the same distribution: >>NO. You misunderstand the logic of hypothesis testing. Failing to>reject a hypothesis does not mean that it is true or that you should>act as if it were true. It means only that, in the way that the test>looks at data, your data are not inconsistent with the hypothesis. >Other tests, that look at the data differently, may well disagree.

Good statement. I'll just add that these so-called non-parametric tests are based on ranks, and their usual tests are calculated on thebasis of "no ties" -- That certainly does not characterize these data, with 50 scores from 1 to 5. It is conceivable that a Monte-carlo test of KS, done by generating 10,000 samples with the same margins, would show that the KS test-outcome *is* an unusual one. Or it might not. It seems to me, though I'm not entirely sure, that the KS test is fundamentally testing the number of "interchanges" in ranks (which is a linear metric), whereas the other two tests are measuring the squared differences in ranks. So, he tests may disagree because they are testing two different ways to measure the non-fit. For these data, I would be willing to report the means as meaningful ... and thus, using that as a guide, I would be willing to use the ordinary t-test for comparison?Rich Ulrich