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

A p-value two ways

In this exercise you'll find out if the observed chi-squared statistic is unusually large under the following notion that,

\(H_0\): Region is independent of Happy.

The competing notion is the alternative hypothesis that there is an association between these variables. For the sake of comparison, you'll be finding the p-value first from the computational approach, then use the approximation.

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

Inference for Categorical Data in R

ดูคอร์ส

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

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Generate null distribution
___ <- ___
  # Specify variables
  ___
  # Set up null
  ___
  # Generated 500 permuted datasets
  ___
  # Calculate statistics
  ___
แก้ไขและรันโค้ด