Are My Results Unexpected?
| English | Chinese | Pinyin |
|---|---|---|
| counts | 计数 | jì shù |
| observed counts | 观测频数 | guān cè pín shuò |
| expected counts | 期望频数 | qī wàng pín shuò |
| chi-square | 卡方 | kǎ fāng |
| goodness-of-fit | 拟合优度 | nǐ hé yōu dù |
When counts surprise us
- Some questions ask whether observed counts 计数 differ from what we'd expect.
- "Do the colors in a candy bag match the advertised mix?"
- We compare the observed counts 观测频数 to the expected counts 期望频数 under a claim.
- Big gaps between observed and expected are the signal of something unusual.
The chi-square family
- The tool is the chi-square 卡方 family of tests, written $\chi^2$.
- It's built for categorical data — counts in categories, not measurements.
- Every chi-square test compares observed counts to expected counts.
- A larger total gap → a larger $\chi^2$ → stronger evidence against the claim.
Which chi-square question?
- Goodness-of-fit 拟合优度: does one categorical variable match a claimed distribution?
- Two-way table questions: are two categorical variables related (across groups or within one)?
- One variable, one sample → goodness-of-fit; a table of two variables → homogeneity/independence.
- Spotting the type is the first decision.
Observed vs. expected
- Every chi-square test rests on one comparison: observed vs. expected counts.
- Expected = what the null hypothesis predicts each count should be.
- Observed = what the data actually show.
- The test measures how far, overall, observed strays from expected.
Chi-square tests use COUNTS, not proportions or percentages. If a problem gives percentages, convert them back to actual counts before computing anything. And the whole logic is observed vs. expected: expected counts come from the null model, and a big total discrepancy is what makes $\chi^2$ large.
A bag claims equal numbers of $4$ candy colors; you count $100$ candies.
- Expected (equal mix): $25$ of each color.
- Observed: $30, 20, 28, 22$ — close, but not exact.
- A chi-square test judges whether these gaps are surprising or just chance.
Chi-square tests ask whether observed counts differ from expected counts for categorical data. A goodness-of-fit test checks one variable against a claimed distribution; two-way table tests check whether two variables are related. Every $\chi^2$ test compares observed vs. expected counts.
A categorical count breakdown
Chi-square tests compare observed slices to expected slices.
Chi-square tests are designed for which kind of data?
Chi-square compares counts in categories.
A goodness-of-fit test involves how many categorical variables?
GOF checks one variable against a claimed distribution.
Chi-square tests should be run on percentages, not counts.
Convert percentages back to counts first — chi-square uses counts.
A bag of 100 candies claims 4 equally likely colors. What is the expected count per color?
100 ÷ 4 = 25 expected per color.
Every chi-square test compares observed counts to ___ counts (one word).
Observed vs. expected is the heart of chi-square.