This is also known as the Cochran-Armitage test for trend. The test is appropriate for testing association between a nominal variable with two levels (say infected and uninfected) and an ordinal variable (say low dose, medium dose high dose).
If one applies the usual Pearson chi squared test for independence, it will not take account of any trend of infection level (p=infected/total) with dosage. The chi squared test for trend test for a linear trend against the null hypothesis of no trend.
In effect this is equivalent to a linear regression (see Unit 12) of proportion infected against score, weighted according to the number of individuals with each score.
The simplest way to apply this test requires you express the data as frequencies:
Score x | Status | Total =n
| Infected =c | Uninfected =d
| low (1) | 5 | 25 | 30
| medium (2) | 14 | 16 | 30
| high (3) | 18 | 12 | 30
| totals | 37 =C | 43 =D | 90 =N
| | |
Algebraically speaking -
X2(L) = {T1 − (CT2/N)}2/V
Where |
X2(L) is tested against chi-square with 1 degree of freedom.
For these data X2(L) was 11.51, which gave a P-value of 0.0007
