What the chi-square statistic compares
A chi-square goodness-of-fit test compares the count observed in each category, , with the count expected under a null model, . For a hypothesized category probability and sample size ,
The test statistic adds a scaled discrepancy from every category:
Squaring prevents positive and negative differences from canceling. Dividing by puts a difference in context: a gap of 4 is much more surprising when 6 cases were expected than when 600 were expected.
Why sparse expected cells are a problem
The usual p-value comes from approximating the sampling distribution of the statistic with a chi-square curve. That approximation works poorly when expected cells are too sparse. A small expected count makes the denominator small, so a change of only one or two observations can produce a large, unstable contribution.
This is why an introductory workflow checks expected counts before calculating the final result. Observed counts may be zero; what matters for the approximation rule is what the null model expected.
A new example
Suppose a spinner's claimed probabilities for blue, green, and gold are , , and . With spins, the expected counts are
All three meet the cited introductory threshold of 5. With only spins, the expected counts would be , so that version would fail the same threshold before any chi-square p-value was interpreted.
Check the model before the arithmetic
A sound pre-test check asks:
- Are the categories mutually exclusive and collectively able to classify every observation?
- Do the hypothesized probabilities sum to 1?
- Are the data independent enough for the sampling model?
- Do the expected counts meet the rule used by the course or software?
Categories should not be combined merely to force a pass. Pooling is defensible only when the combined category still has a clear substantive meaning and the analysis accounts for the resulting change in degrees of freedom.
관련 질문
이 지식을 활용하기
개념 가이드로 추론 과정을 이해한 뒤 전체 질문과 상세 답변으로 돌아가세요.
State the Requirements to Perform a Chi-Square Goodness-of-Fit Test출처
이 참고 자료는 위에서 설명한 핵심 개념과 해석 범위를 뒷받침합니다.