计算检验力与样本量
您想比较游戏公司与广告公司在每轮投资中的平均融资额。您先计算双样本 t 检验的检验力。
我们已为您加载了三样内容:
ads_acquired_avg_funding-(pandas Series)每家被收购广告公司的平均融资额games_acquired_avg_funding-(pandas Series)同上,但针对游戏公司ads_games_cohensd-(数字)广告公司相对于游戏公司的 Cohen's d(标准化效应量)
用于计算检验力的函数已从 statsmodels.stats.power 导入。
本练习是课程的一部分
Python 推断基础
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Compute the ratio of games to advertising companies
games_ads_ratio = ____ / ____
# Compute the power of the test
____().____(effect_size=____,
nobs1=____,
alpha=____,
ratio=____)