开始使用免费开始使用

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%
____
编辑并运行代码