Categorical outcomes are analyzed according to whether observations are independent or paired.
For independent groups, Pearson’s chi-square test or Fisher’s exact test assesses association between categorical variables. The choice between them depends mainly on whether the expected cell counts are large enough for the chi-square approximation. For binary outcomes measured twice in the same participants, the observations are paired and McNemar’s test is used instead.
9.1 Choosing the categorical test
| Data structure | Condition | Test |
|---|---|---|
| independent categorical observations | expected counts adequate | Pearson chi-square test |
| independent categorical observations | expected counts sparse | Fisher’s exact test |
| paired binary observations | same participants measured twice | McNemar’s test |
For independent observations, a practical criterion for using the Pearson chi-square approximation is based on the expected cell counts, not the observed counts: no expected count should be below 1, and no more than 20% of expected counts below 5. If these conditions are not met, Fisher’s exact test is preferred.