Pearson statistic
Definition taught in Chi-squared tests, part of Statistical inference
Pearson statistic
| Type | Definition |
| Taught in | Chi-squared tests |
| Part | Statistical inference |
| Properties | 2 |
| Worked examples | 2 |
| Questions using it | 1 |
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.
Properties
Pearson chi-squared approximation
Main article: 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.
Pearson test with estimated parameters
Main article: Pearson test with estimated parameters
Let (X_1,\ldots,X_k) be multinomial with cell probabilities p_i(\theta), where \theta has r free coordinates. If \widehat\theta is the maximum likelihood estimator of \theta from the counts and \widehat p_i=p_i(\widehat\theta), then
\sum_{i=1}^k\frac{(X_i-n\widehat p_i)^2}{n\widehat p_i}
is approximately \chi^2_{k-1-r} for large n.
Examples
Frizzled chickens
Worked example from Chi-squared tests
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.
Is the die fair?
Question page: Is the die fair?
A die is rolled 120 times, giving faces 1 to 6 with frequencies 14, 22, 16, 25, 19 and 24. Test whether the die is fair at level 0.05. Use \chi^2_{5;0.95}=11.07.
Under H_0 each face has probability 1/6, so each expected count is 120/6=20. Then
T=\frac{(14-20)^2+(22-20)^2+(16-20)^2+(25-20)^2+(19-20)^2+(24-20)^2}{20}=\frac{36+4+16+25+1+16}{20}=4.90,
on 6-1=5 degrees of freedom. Since 4.90<11.07, the test does not reject fairness; the p-value is 0.43.
Used in
- Taught in Chi-squared tests, where the derivation and examples are.
- Questions that use it (1) — Counting degrees of freedom
- All 4 questions on Chi-squared tests
See also
Chi-squared test of independence · Pearson chi-squared approximation · Pearson test with estimated parameters