今天遇到一个问题,就是非正态数据独立小样本应该用 Mann-Whitney还是Kolmogorov-Smirnov检验。
这是搜到的答案:
The Mann-Whitney test first ranks all the values from low to high, and then computes a P value that depends on the discrepancy between the mean ranks of the two groups.
The Kolmogorov-Smirnov test compares the cumulative distribution of the two data sets, and computes a P value that depends on the largest discrepancy between distributions.
Here are some guidelines for choosing between the two tests:
The KS test is sensitive to any differences in the two distributions. Substantial differences in shape, spread or median will result in a small P value. In contrast, the MW test is mostly sensitive to changes in the median.
The MW test is used more often and is recognized by more people, so choose it if you have no idea which to choose.
The MW test has been extended to handle tied values. The KS test does not handle ties so well. If your data are categorical, so has many ties, don’t choose the KS test.
Some fields of science tend to prefer the KS test over the MW test. It makes sense to follow the traditions of your field.
简单的提示就是:数据分布形状、范围和中位数的差异会导致KS检验显著,而MW检验主要对中位数的变化敏感。
MW检验更常用,不知道选什么的时候选这个。