CommencerCommencer gratuitement

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).

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