T-test for difference in means
You're a Data Scientist at an e-commerce company tasked with helping the payments team choose the checkout page design that leads to higher order value and faster purchase decisions.
After estimating the required sample size and passing all sanity checks, you'll analyze differences in the average order_value and time_on_page between checkout_page variants to decide which design performs best.
The checkout DataFrame is available, and pingouin, pandas, and numpy have been loaded for you.
NaN values in order_value may indicate users who didn't complete a purchase. You'll analyze the average order value only among completed orders (complete data).
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)