I am learning data mining and have difficulty understanding below code. Could anyone explain it to me? Thank you very much.
What are the uses of the three % signs? How to understand % (stat, p)?
How to understand the syntax stat, p = mannwhitneyu(data1, data2)? This is the first time I ask a question here. If I am not following the conventions or rules, please let me know. Thanks.
from scipy.stats import mannwhitneyu
data1 = [23, 45, 78, 56, 48] data2 = [90, 43, 28, 79, 69] data3 = [87, 56, 29, 52, 39]
compare samples
stat, p = mannwhitneyu(data1, data2) print('Statistics = %.3f, p = %.3f' % (stat, p))
interpret
alpha = 0.05 if p > alpha: print('Same distribution (fail to reject H0)') else: print('Different distribution (reject H0)')