1. Learn
  2. /
  3. Courses
  4. /
  5. A/B Testing in Python

Connected

Exercise

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

Instructions 1/3

undefined XP
  • 1
    • Calculate the mean order_value per variant, and run a t-test for difference in order_value between variants A and B.
  • 2
    • Calculate the mean time_on_page per variant, run a t-test for its difference between variants A and B, and note the p-value and confidence interval of the difference. Will you reject the Null hypothesis?
  • 3
    • Calculate the mean time_on_page per variant, run a t-test for its difference between variants A and C, and note the p-value and confidence interval of the difference. Will you reject the Null hypothesis?