Python:Wilcoxon signed-rank test

import scipy.stats as st
# A = [0.4268,
# 0.2847,
# 0.1593,
# 0.4842,
# 0.3472,
# 0.1608,
# 0.3755,
# 0.5823,
# 0.6279,
# 0.7582,
# 0.3577,
# 0.3146,
# 0.6209,
# 0.7693,
# 0.7961,
# 0.8744,
# 0.5683,
# 0.5293
# ]
#
# B = [0.4189,
# 0.2876,
# 0.1849,
# 0.482,
# 0.343,
# 0.1552,
# 0.3624,
# 0.5761,
# 0.6276,
# 0.758,
# 0.3519,
# 0.3074,
# 0.5925,
# 0.7611,
# 0.7987,
# 0.8757,
# 0.5563,
# 0.5139
# ]

A=[0.5368,
0.4123,
0.1967,
0.6385,
0.4074,
0.2168,
0.4442,
0.8514,
0.8972,
1.4072,
0.4029,
0.3443,
0.9706,
1.8192,
1.887,
2.9375,
0.8605,
0.744
]
B= [0.521,
0.4113,
0.2111,
0.6273,
0.3993,
0.1906,
0.4201,
0.8113,
0.8549,
1.343,
0.3919,
0.3331,
0.9089,
1.7043,
1.7678,
2.7712,
0.8148,
0.6978
]
print(st.wilcoxon(A,B))

输出结果:

WilcoxonResult(statistic=6.0, pvalue=0.0005348563282113272)

你可能感兴趣的:(Python学习,算法)