A two-by-two table is a two-proportion test
Topic: Chi-squared tests · more questions on this topic
‹ Is the die fair? Counting degrees of freedom ›
Of 70 viewers of one channel, 40 are left-wing; of 100 viewers of another, 50 are. Compute the Pearson statistic for independence of channel and allegiance, and check that it equals the square of the pooled two-proportion z statistic, 0.918.
The table and its fitted counts R_iC_j/170 are
| Left | Not left | Total | |
|---|---|---|---|
| Channel 1 | 40 (37.06) | 30 (32.94) | 70 |
| Channel 2 | 50 (52.94) | 50 (47.06) | 100 |
| Total | 90 | 80 | 170 |
Every cell differs from its fitted count by 2.94 in absolute value, so
T=2.94^2\Bigl(\frac1{37.06}+\frac1{32.94}+\frac1{52.94}+\frac1{47.06}\Bigr)=0.843.
The pooled two-proportion statistic is z=0.918, and 0.918^2=0.843. The two statistics agree, and \chi^2_1 is the law of the square of a standard normal. The chi-squared p-value, 0.36, is the two-sided z test’s; the one-sided z test halves it.