我正在使用SciPy进行Wilcoxon测试和Friedman测试。例如,我有3组样本。
sample1 = [0.76623377, 0.77922078, 0.71428571, 0.63636364, 0.7012987, 0.66233766, 0.72727273, 0.67532468, 0.63157895, 0.77631579]
sample2 = [0.80519481, 0.76623377, 0.71428571, 0.71428571, 0.71428571, 0.72727273, 0.85714286, 0.74025974, 0.67105263, 0.77631579]
sample3 = [0.85714286, 0.74025974, 0.68831169, 0.77922078, 0.74025974, 0.77922078,0.80519481, 0.7012987, 0.73684211, 0.76315789]
如果我对样本1和样本2应用 Wilcoxon检验,请使用:
from scipy.stats import wilcoxon
t_stat, p = wilcoxon(sample1, sample2)
我得到了错误:
样本1不等于样本2。
如果我对所有3个样本都应用 Friedman检验,请使用:
from scipy.stats import friedmanchisquare
stat, `p = friedmanchisquare(sample1, sample2, sample3)
我接受了:sample 1 = sample 2 = sample3
那怎么可能?有什么解释吗?
在此处附加python输出: