計算檢定力與樣本數
你想比較遊戲公司與廣告公司在每輪投資中的平均募資金額。你先從計算雙樣本 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=____)