Test for independence
MathDefinition
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
- State H₀: the two variables are independent (no association).
- Organize data into a two-way table of observed counts.
- Calculate expected counts: (row total × column total) / grand total.
- Compute χ² = Σ (observed − expected)² / expected.
- 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: