Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import defaultdict
- from scipy.stats import ttest_ind
- import numpy as np
- if __name__=='__main__':
- response_times = defaultdict(list)
- with open('log.txt', 'r') as input_file:
- for line in input_file:
- index, response, time = line.split(',')
- response_times[response].append(float(time))
- print 'Mean response times'
- for k in response_times.keys():
- print(k, np.mean(response_times[k]))
- pval = ttest_ind(response_times['/index'], response_times['/test'], equal_var=False)[1]
- print 'P-value =', pval
- if pval > 0.05:
- print 'H0 hypothesis accepted'
- else:
- print 'H0 hypothesis rejected'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement