Chi-squared test with known cell probabilities

Section of Chi-squared tests, part of Statistical inference

Chi-squared test with known cell probabilities

Type Section
Taught in Chi-squared tests
Part Statistical inference

Definition 1 (Pearson statistic) Let (X_1,\ldots,X_k) be multinomial with n trials and cell probabilities p_1,\ldots,p_k. For reference probabilities \pi_1,\ldots,\pi_k the Pearson statistic is

T=\sum_{i=1}^k\frac{(X_i-n\pi_i)^2}{n\pi_i}=\sum_{i=1}^k\frac{(O_i-E_i)^2}{E_i},

where O_i is the observed count and E_i=n\pi_i is the expected count.

Article: Pearson statistic →

Theorem 1 (Pearson chi-squared approximation) If p_i=\pi_i for every i, the Pearson statistic T has approximately the \chi^2_{k-1} distribution for large n.

Article: Pearson chi-squared approximation →

The case k=2 shows where the k-1 comes from. With two cells, X_2=n-X_1 and \pi_2=1-\pi_1, so X_2-n\pi_2=-(X_1-n\pi_1), and

T=(X_1-n\pi_1)^2\Bigl(\frac1{n\pi_1}+\frac1{n(1-\pi_1)}\Bigr)=\frac{(X_1-n\pi_1)^2}{n\pi_1(1-\pi_1)}=Z^2,

where Z is the standardised binomial count. By the central limit theorem Z is approximately standard normal, so T is approximately \chi^2_1. Two cells give one free squared normal, because the constraint X_1+X_2=n ties the second cell to the first. For general k, the vector of standardised counts is approximately normal by the multivariate central limit theorem, and the constraint \sum X_i=n confines it to a (k-1)-dimensional subspace; the sum of squares there is \chi^2_{k-1}.

The approximation needs every expected count to be large. A usual rule of thumb asks for E_i\ge5 in every cell. Classes with small expected counts are merged before the test is done. The test rejects for large T: at level \alpha, when T\ge\chi^2_{k-1;1-\alpha}. The alternative is simply that the reference probabilities are wrong, in any way at all.

Example 1 (Frizzled chickens) Genetic theory predicts that chickens of types FF, Ff and ff, which are extremely frizzled, slightly frizzled and normal, occur in proportions 1:2:1. Of 93 chickens, 23, 50 and 20 are of the three types.

Question. Are the counts consistent with the theory, at level 0.05?

Solution. The counts are \operatorname{Multinomial}(93;\,p_1,p_2,p_3). Test H_0:(p_1,p_2,p_3)=(1/4,1/2,1/4). The expected counts are 23.25, 46.5 and 23.25, and

T=\frac{(23-23.25)^2}{23.25}+\frac{(50-46.5)^2}{46.5}+\frac{(20-23.25)^2}{23.25}=0.003+0.263+0.454=0.72,

on 3-1=2 degrees of freedom. The critical value is \chi^2_{2;0.95}=5.991, and the p-value is 0.70. The counts are consistent with the 1:2:1 theory.

Used in

See also

Pearson statistic · Pearson chi-squared approximation · Pearson test with estimated parameters · Chi-squared test of independence · Counts in categories · Chi-squared test with estimated parameters · Contingency tables · Observed and expected counts

Glossary and index