Data Science, Causal Inference, Linear Regression, Getting Started, Ab Testing.
difference between the two means. # defining samples control_values = df[df.treatment == 0].time_spent_mins.values exp_values = df[df.treatment == 1].time_spent_mins.values # calculating p-values from scipy.stats import ttest_ind ttest_ind(exp_values, control_values) # Output: