Exercise

prop_test() for two samples

That took a lot of effort to calculate the p-value, so while it is useful to see how the calculations work, it isn't practical to do in real-world analyses. For daily usage, it's better to use the infer package.

Recall the hypotheses.

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

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

late_shipments is available; infer is loaded.

Instructions

100 XP

Using the late_shipments dataset, use prop_test() to perform a proportion test appropriate to the hypotheses.

  • Specify a hypothesis of late versus freight_cost_group.
  • Set the order of the freight cost groups.
  • Specify the success value for late and the type of alternative hypothesis.
  • Don't use Yates' continuity correction.