1. Learn
  2. /
  3. Courses
  4. /
  5. Practicing Statistics Interview Questions in Python

Exercise

Calculating sample size

Let's finish up our dive into statistical tests by performing power analysis to generate needed sample size. Power analysis involves four moving parts:

  • Sample size
  • Effect size
  • Minimum effect
  • Power

In this exercise, you're working with a website and want to test for a difference in conversion rate. Before you begin the experiment, you must decide how many samples you'll need per variant using 5% significance and 95% power.

Instructions 1/3

undefined XP
  • 1

    Standardize the effect of a conversion rate increase from 20% to 25% success using the proportion_effectsize() function.

  • 2

    Calculate and print the needed sample size using the zt_ind_solve_power() function.

  • 3

    Adapt your code to solve for needed sample size using 80% power instead; observe what happens.