Advertisement
Dodma

Untitled

May 3rd, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. from scipy import stats as st
  2. mean_user_score_action = since2012[since2012['genre']=='action']['user_score']
  3. mean_user_score_sports = since2012[since2012['genre']=='sports']['user_score']
  4.  
  5. alpha = 0.05
  6.  
  7. results = st.ttest_ind(
  8. mean_user_score_action,
  9. mean_user_score_sports)
  10.  
  11. print('p-значение:', results.pvalue)
  12.  
  13. if (results.pvalue < alpha):
  14. print("Отвергаем нулевую гипотезу")
  15. else:
  16. print("Не получилось отвергнуть нулевую гипотезу")
  17.  
  18. p-значение: nan
  19. Не получилось отвергнуть нулевую гипотезу
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement