เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Is the data consistent with the model?

In general, it's a good idea to use two-tailed p-values, which you have calculated like this:

# Compute two-tailed p-value
null %>%
  summarize(pval = 2 * mean(stat <= d_hat))

In the case of the chi-squared, however, you compute only the right tail, which makes it a one-tailed test. This is the tail with statistics that are more common when the hypothesis of independence is false.

Using the objects that you created in the previous exercise (null_spac, null_arms, chi_obs_spac, and chi_obs_arms), compute the p-values of these two hypothesis tests and use them to select the correct answer below. Note that you'll have to tweak the code above to be sure to include only the right (greater than) tail in your p-values.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Inference for Categorical Data in R

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำจริง

เปลี่ยนทฤษฎีให้เป็นการลงมือทำด้วยแบบฝึกหัดเชิงโต้ตอบหนึ่งในของเรา

เริ่มแบบฝึกหัด