1. Learn
  2. /
  3. 课程
  4. /
  5. Python 假设检验

Connected

道练习

两个样本的 proportions_ztest()

手动计算 p 值非常费力。了解计算过程很有用,但在真实分析中并不实用。日常使用时,最好使用 statsmodels 包。

回顾假设。

$H_{0}$:\(late_{\text{expensive}} - late_{\text{reasonable}} = 0\)

$H_{A}$:\(late_{\text{expensive}} - late_{\text{reasonable}} > 0\)

提供了 late_shipments,其中包含 freight_cost_group 列。numpy 和 pandas 已按常用别名加载,并且已从 statsmodels.stats.proportion 导入了 proportions_ztest。

说明 1 / 共 2 个

undefined XP
    1
    2
  • 计算按 freight_cost_group 分组后的 late 列的计数。