count_statistics.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:interpretese 作者: hhexiy 项目源码 文件源码
def ttest(list1, list2):
   a1 = np.array(list1)
   a2 = np.array(list2)
   t, prob = stats.ttest_rel(a1, a2)
   print '-'*40
   print '{:<10s}{:<10s}{:<10s}{:<10s}'.format('mean1', 'mean2', 't-stat', 'p-value')
   print '{:<10.6f}{:<10.6f}{:<10.6f}{:<10.6f}'.format(np.mean(a1), np.mean(a2), t, prob)
   print '-'*40
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号