1. Learn
  2. /
  3. Courses
  4. /
  5. Foundations of Inference in Python

Connected

Exercise

Computing power and sample sizes

You want to compare average funding per investment round for games companies versus advertising companies. You begin by computing the power of a two sample t-test.

Three things have been loaded for you:

  • ads_acquired_avg_funding - (pandas Series) The average funding of each acquired advertising company
  • games_acquired_avg_funding - (pandas Series) Same, but for game companies
  • ads_games_cohensd - (Number) Cohen's d (standardized effect size) for advertising versus games company's

The function needed to compute power has been imported from statsmodels.stats.power.

Instructions 1/2

undefined XP
    1
    2
  • Compute the ratio of games companies (games_n) to advertising companies (ads_n).
  • Compute power with an effect size ads_games_cohensd, alpha of 5%, number of advertising companies ads_n as nobs1, and the games_ads_ratio above.