T-test for difference in means
Imagine that you are a Data Scientist at an e-commerce company where you were tasked with running an experiment to help the payments team decide which checkout page design yields higher order value and fastest purchase decision time. Assuming you already estimated the required sample size per variant and successfully passed all the sanity checks, you will analyze the differences in average order_value
and time_on_page
metrics between the checkout_page
variants, and make a decision on the best performing design.
checkout DataFrame is available for you and pingouin
has been loaded along with pandas
and numpy
.
This exercise is part of the course
A/B Testing in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Calculate the mean order values and run a t-test between variants A and B
print(checkout.____('checkout_page')['____'].____())
ttest = ____.____(x=checkout[checkout['checkout_page']=='____']['____'],
y=checkout[checkout['checkout_page']=='____']['____'],
paired=____,
alternative="____")
print(ttest)