Mistake Master
Count the Populations Sampled, Then Let the Margins Do the Arithmetic
You'll learnhow to set up a chi-square test — choosing homogeneity or independence by how the data were sampled rather than by how the table looks, computing expected counts from the row and column totals, feeding the test counts instead of percentages, checking that every expected count reaches 5, and reading the degrees of freedom off the table's shape.
Both chi-square tests run on the same two-way table and produce the same statistic, which is exactly why the choice between them has to be made deliberately: nothing in the finished arithmetic will reveal it. Three schools surveyed separately is three populations and one variable, homogeneity; one school's students classified by grade and by answer is one population and two variables, independence. After that the machine is margins all the way down — each cell's expected count is its row total times its column total over the grand total. The counts have to be counts, because 60 percent of 10 people and 60 percent of 1,000 are different evidence, and this page runs the same percentages through the same formula and watches half the evidence vanish. The condition at the end is on the expected counts, not the observed ones, which is the direction nearly everyone checks it in. Twelve short steps; press Next for each one.