Expected Count vs Chi-Square Test

Both terms below come up in the same part of the course, and students mix them up. Here is each one defined on its own, side by side, so you can see where they part company.

Expected count

Hypothesis testing

An expected count is how many observations a category would get if the null hypothesis were exactly true; it is the baseline in a chi-square test.

Expected counts are the tallies a chi-square model predicts for each cell when the null hypothesis holds, and the test measures how far the observed counts drift from them. For a two-way table, each cell's expected count is E=(row total)×(column total)grand totalE = \frac{(\text{row total}) \times (\text{column total})}{\text{grand total}}. For example, in a 200-person table a cell whose row totals 80 and column totals 50 has E=80×50200=20E = \frac{80 \times 50}{200} = 20. Every expected count should be at least 5 for the chi-square approximation to be trustworthy.

Full entry for expected count

Chi-square test

Hypothesis testing

A chi-square test compares observed counts of categorical data to the counts expected under a hypothesis, gauging how far the data stray from that model.

A chi-square test works with counts in categories rather than means, checking goodness of fit, independence, or homogeneity. It adds up the squared gaps between observed and expected counts, each scaled by the expected count, into one statistic. The formula is χ2=(OE)2E\chi^2 = \sum \frac{(O - E)^2}{E}, where OO is an observed count and EE an expected count. For example, rolling a die 60 times and comparing each face's tally to the expected 10 tests whether the die is fair, and a large χ2\chi^2 gives a small p-value.

Full entry for chi-square test

Where each one fits in the course