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

Exercise

Sample size for proportions

Real datasets can be messy. As an Analytics Engineer working with data in the real world, you will encounter situations where the variance in the data is too high to be able to capture a meaningful difference in the metrics. This problem is more likely to happen with continuous metrics such as the average order value in the previous exercise. There are several ways to tackle this, but one of the workarounds is finding a metric that has lower variance but still aligns with the business goals.

Here you will look at calculating the sample size for a binary metric; signup rate which represents whether a user signed up for the service or not, as opposed to the paid price which may vary more between users. The homepage DataFrame and pandas, numpy libraries are already loaded for you, as well as proportion_effectsize from statsmodels.stats.proportion and power from statsmodels.stats.

Instructions 1/3

undefined XP
    1
    2
    3
  • Calculate the signup rate of landing_page 'A'.