Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import numpy as np
  2. from scipy.stats import mannwhitneyu
  3. sample1=[32, 34, 29, 39, 38, 37, 38, 36, 30, 26]
  4. sample2=[40, 34, 30, 39, 38, 37, 38, 36, 50, 49]
  5. stat, pvalue=mannwhitneyu(sample1, sample2)
  6. print('statistics=%.3f, p=%.5f'%(stat,pvalue))
  7. alpha=0.05
  8. if pvalue> alpha:
  9. print('Two Groups are from the Same distribution(fail to reject H0) under alpha=0.05')
  10. else:
  11. print('Two Groups are from Different distributions(reject H0) under alpha=0.05')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement