在 SciPy 中使用 Fisher 方法
假設你閱讀了 5 篇探討健康飲食與癌症診斷關係的研究,並已將報告的 p 值載入清單 p_values = [0.04, 0.13, 0.001, 0.09, 0.01]。每篇研究檢定的虛無假設都是「健康飲食與癌症診斷無關」,對立假設則是「兩者有關」。
請用 SciPy 的 Fisher 方法來結合這些 p 值。
SciPy 的 stats 套件已為你載入。
本練習屬於課程
Python 推論基礎
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Compute the combined p-value and the p-value for this test
test_statistic, p_value = ____
# Print out the p-value for the test
____('Test p-value = ', ____)
# Print out if the p-value is signifcant at 5%
____