Last active
October 2, 2019 08:15
-
-
Save lylayang/4028aeb21433f37b5bc6bcd1f7b21a7a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.stats import ttest_ind | |
import numpy as np | |
order_value_control_group=[32, 34, 29, 22, 39, 38, 37, 38, 36, 30, 26, 22, 22] | |
order_value_experimental_group=[40, 39, 30, 22, 39, 38, 37, 38, 36, 50, 26, 22, 49] | |
AOV_control_group=int(np.mean(order_value_control_group)) | |
AOV_experimental_group=int(np.mean(order_value_experimental_group)) | |
print('Average Order Value of Control Group: $', AOV_control_group) | |
print('Average Order Value of Experiment Group: $', AOV_experimental_group) | |
tscore, pval=ttest_ind(order_value_control_group, order_value_experimental_group) | |
print('t-score:', round(tscore,3)) | |
print('p value:', round(pval,3)) | |
#[Output]: | |
# Average Order Value of Control Group: $ 31 | |
# Average Order Value of Experiment Group: $ 35 | |
# t-score: -1.544 | |
# p value: 0.136 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment