Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from scipy import stats as st
- mean_user_score_action = since2012[since2012['genre']=='action']['user_score']
- mean_user_score_sports = since2012[since2012['genre']=='sports']['user_score']
- alpha = 0.05
- results = st.ttest_ind(
- mean_user_score_action,
- mean_user_score_sports)
- print('p-значение:', results.pvalue)
- if (results.pvalue < alpha):
- print("Отвергаем нулевую гипотезу")
- else:
- print("Не получилось отвергнуть нулевую гипотезу")
- p-значение: nan
- Не получилось отвергнуть нулевую гипотезу
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement