Counts in categories

Section of Chi-squared tests, part of Statistical inference

Counts in categories

Type Section
Taught in Chi-squared tests
Part Statistical inference

Throw n balls independently into k urns, each ball landing in urn i with probability p_i. The numbers (X_1,\ldots,X_k) in the urns are multinomial:

\mathbb{P}(X_1=x_1,\ldots,X_k=x_k)=\frac{n!}{x_1!\cdots x_k!}\,p_1^{x_1}\cdots p_k^{x_k},\qquad x_1+\cdots+x_k=n.

Each X_i is \operatorname{Bin}(n,p_i) on its own, so \mathbb{E} X_i=np_i. The counts are not independent, because they must add to n. Data become multinomial whenever individuals are sorted into classes.

Example 1 (Army recruits by IQ class) Suppose recruits’ IQ scores are \operatorname{N}(100,16^2), and recruits are classed as 1 (IQ at most 90), 2 (between 90 and 110) or 3 (above 110).

Question. Of 7 new recruits, what is the probability that 2 are in class 1, 4 in class 2 and 1 in class 3?

Solution. The class probabilities are p_1=\Phi\{(90-100)/16\}=\Phi(-0.625)=0.266, p_3=0.266 by symmetry, and p_2=0.468. The class counts are \operatorname{Multinomial}(7;\,0.266,0.468,0.266), so

\mathbb{P}(X_1=2,X_2=4,X_3=1)=\frac{7!}{2!\,4!\,1!}\,0.266^2\times0.468^4\times0.266=0.095.

Used in

See also

Pearson statistic · Pearson chi-squared approximation · Pearson test with estimated parameters · Chi-squared test of independence · Chi-squared test with known cell probabilities · Chi-squared test with estimated parameters · Contingency tables · Observed and expected counts

Glossary and index