Get startedGet started for free

Sample size for means

When designing an A/B test, you as a Data Scientist are responsible for checking if a test is feasible in the first place. This entails answering several questions such as: do we have enough traffic? How do we quantify "enough"? What is the minimum difference we can detect given the sample size we have? How long does an experiment need to run? And more.

In this exercise, you will calculate the minimum sample size required to capture a statistically significant difference of a certain value between the baseline mean order_value for the control group, and a new design to be tested.pandas, numpy,matplotlib, seaborn libraries and the checkout DataFrame are already imported and loaded for you, as well as power from statsmodels.stats.

This exercise is part of the course

A/B Testing in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Calculate and print the baseline mean and standard deviation
mean_B = ____
print(mean_B)

std_B = ____
print(std_B)
Edit and Run Code