Test for independence

Math

Definition

A chi-square test for independence determines whether two categorical variables are associated or independent within a single population. It uses observed and expected frequencies in a two-way table to assess whether knowing one variable helps predict the other.

How It Works

  1. State H₀: the two variables are independent (no association).
  2. Organize data into a two-way table of observed counts.
  3. Calculate expected counts: (row total × column total) / grand total.
  4. Compute χ² = Σ (observed − expected)² / expected.
  5. Determine the p-value using df = (r − 1)(c − 1) and draw a conclusion.

Examples

  • Testing whether gender and preferred study method are independent among college students
  • Determining if there is an association between exercise frequency and sleep quality
  • Checking whether phone brand preference is independent of age group
Key Fact

χ² = Σ (O − E)² / E; H₀ states the two variables are independent

Study This Concept

Practice test for independence with free review games in these units: