Setting Up a Chi-Square Test for Homogeneity or Independence
▶︎ Watch it animatedinteractive step-through · ~3 min · optionalHomogeneity and independence share their arithmetic and differ in design: homogeneity draws separate random samples from two or more populations and classifies each individual on one categorical variable, while independence draws one sample and classifies each individual on two. Hypotheses are written in words, naming the variables and the population, with an alternative that says the distributions differ somewhere. Expected counts are $\frac{(\text{row total})(\text{column total})}{\text{grand total}}$, so school A's expected yes count is $\frac{200 \times 276}{550} \approx 100.4$, and $df = (r-1)(c-1)$, which is 2 for a 3-by-2 table regardless of sample size.
The test gets fed the wrong food and chosen by the wrong rule. Percentages go in where counts belong, though 60% of 10 and 60% of 1,000 carry entirely different evidence. The expected-counts condition gets checked against the observed counts instead, so a cell with 12 observed and 3 expected passes and a cell with 2 observed and 8 expected fails, both backwards. Degrees of freedom get computed from $n$ rather than from the table's shape. And the choice between the two tests gets made from the wording of the question rather than from how many populations were sampled.
The work
3 ways in · any order
Lesson
Setting Up a Chi-Square Test for Homogeneity or Independence
›
Chooses between homogeneity and independence by counting the populations sampled, writes the hypotheses in words, computes expected counts from the margins, insists the test be fed counts rather than percentages, and checks the expected counts against 5 with degrees of freedom from the table's shape.
Diagnostic
10-item topic check
›
Ten items on chi-square setup: the wrong test chosen for the design, percentages fed to the statistic, the counts condition checked against observed values, and degrees of freedom taken from the sample size. Take it cold to find your habit, or after the lesson to check it is gone.
Targeted Practice
Drill a single misconception
›
Pick one of the failure modes you missed and drill it on its own. The round is adaptive: two correct in a row clears it for now and moves you to the next. Two in a row is a checkpoint, not proof: if the error resurfaces later, the misconception comes back.