Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. from itertools import combinations
  2.  
  3. # this gives every n=2 combination of items from the list
  4. pair = combinations(['Full','Side','Category','None'],2)
  5.  
  6.  
  7.  
  8.  
  9. ############################
  10.  
  11. # do t-tests
  12. for i in list(pair):
  13. p = scipy.stats.ttest_rel(group2[(group2['Attention Level']==i[0]) & (group2['Category']=='Face')]['Nov_Diff'],
  14. group2[(group2['Attention Level']==i[1]) & (group2['Category']=='Face')]['Nov_Diff'])
  15.  
  16. #if p[1] <.05:
  17. print(i)
  18. print('p = ' + str(p))
  19. print(' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement