CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

A/B Testing in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de 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)
Modifier et exécuter le code