Advertisement
Dodma

Untitled

Jul 1st, 2020
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. print("{0:.3f}".format(stats.mannwhitneyu(orders[orders['group']=='A']['revenue'], orders[orders['group']=='B']['revenue'])[1]))
  2. print("{0:.3f}".format(orders[orders['group']=='B']['revenue'].mean()/orders[orders['group']=='A']['revenue'].mean()-1))
  3.  
  4. 0.365
  5. 0.259
  6.  
  7.  
  8. print("{0:.3f}".format(stats.mannwhitneyu(
  9. orders[np.logical_and(
  10. orders['group']=='A',
  11. np.logical_not(orders['userId'].isin(abnormalUsers)))]['revenue'],
  12. orders[np.logical_and(
  13. orders['group']=='B',
  14. np.logical_not(orders['userId'].isin(abnormalUsers)))]['revenue'])[1]))
  15.  
  16. print("{0:.3f}".format(
  17. orders[np.logical_and(orders['group']=='B',np.logical_not(orders['userId'].isin(abnormalUsers)))]['revenue'].mean()/
  18. orders[np.logical_and(
  19. orders['group']=='A',
  20. np.logical_not(orders['userId'].isin(abnormalUsers)))]['revenue'].mean() - 1))
  21. 0.369
  22. -0.020
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement