PHARM/PCS V5 · Procedure 42 Pairwise and Nonparametric
Chi-Square Test
Test whether two categorical variables are associated, from a contingency table of counts, with Yates' correction applied automatically to 2×2 tables.
What it computes
Tests whether observed frequencies differ significantly from expected (independence test). Enter each row of the contingency table as a group. For 2×2 tables, Yates' continuity correction is applied automatically.
Inputs and outputs
You provide
- Each row of the contingency table, entered as a separate block of counts
PHARM/PCS reports
- The chi-square statistic and degrees of freedom
- An exact p-value and the verdict
- A chart of observed against expected counts in each cell
When to use it
For counts, not measurements: testing whether two categorical variables are associated (a contingency table) or whether observed frequencies depart from expected. For confidence limits on a single proportion, use Procedure 43.
Reading the results
Chi-square is unreliable when expected cell counts are small (a common rule: watch out below about 5 per cell); with sparse tables an exact test is safer. Yates' continuity correction (a small adjustment that keeps the 2×2 test from overstating significance with discrete counts) is applied automatically; a significant result shows association but not its direction or strength, which you read from the table itself.
No chi-square table needed
V5 computes the chi-square distribution directly and reports an exact p-value, where the 1986 program compared the statistic against the book's Table A.8.
This page describes the procedure. Calculations run inside the licensed PHARM/PCS V5 application. PHARM/PCS is a trademark of MCS Scientific LLC.