Generation

generate functionTue, 21 Mar 2023

Rewrite this code to calculate Wilcoxon statistics stat, p = mannwhitneyu(data[data['version'] == 'gate_30']['sum_gamerounds'], data[data['version'] == 'gate_40']['sum_gamerounds']) print('Mann-Whitney Statistics=%.3f, p=%.3f' % (stat, p))

from scipy.stats import mannwhitneyu def wilcoxon(a, b): stat, p = mannwhitneyu(data[data['version'] == a]['sum_gamerounds'], data[data['version'] == b]['sum_gamerounds']) print('Mann-Whitney Statistics=%.3f, p=%.3f' % (stat, p)) wilcoxon('gate_30','gate_40')

Questions about programming?Chat with your personal AI assistant