Log in / Register Soon
Official Education Partner of the Delhi Medicos Premier League — free question bank for every player and college
SN1 SHORT NOTE 5M ★ High-yield

Describe the chi-square test and its applications.

Community Medicine · 3rd Professional

The Chi-square Test

The chi-square (χ²) test is a non-parametric test applied to qualitative (categorical) data. It compares the observed frequencies with those expected if the null hypothesis were true, and is the commonest statistical test in community medicine because so much public health data is categorical.

  • χ² = the sum of (observed - expected)² / expected, summed over every cell of the table
  • Its logic is straightforward — the larger the discrepancy between what was observed and what would be expected by chance, the larger the value of chi-square, and the less likely the null hypothesis becomes
  • The expected frequency for any cell = (row total × column total) / grand total
  • Degrees of freedom = (number of rows - 1) × (number of columns - 1), so a 2 × 2 table has one degree of freedom
  • The three applications:
  • 1. Test of association (independence) — whether two categorical variables are associated: is disease related to exposure, is treatment related to outcome. This is much the commonest use
  • 2. Test of goodness of fit — whether an observed distribution matches a theoretical one, as in testing Mendelian ratios
  • 3. Test of homogeneity — whether several populations are similar with respect to a characteristic
  • The assumptions must be stated, because they determine when the test may be used at all:
  • The data must be frequencies (actual counts), not percentages, proportions or means. Applying chi-square to percentages is a common and serious error, since the test depends on the actual numbers
  • Observations must be independent — each subject contributes to one cell only. Paired data therefore require McNEMAR’S test instead
  • The sample must be reasonably large, with NO expected frequency below 5 in more than about 20% of cells, and none below 1
  • Categories must be mutually exclusive and exhaustive
  • When the expected numbers are too small, there are three options — combine adjacent categories; apply YATES’S continuity correction in a 2 × 2 table, which subtracts 0.5 from the absolute difference and makes the test more conservative; or use FISHER’S exact test, which calculates the exact probability and is the preferred solution for small numbers
  • The interpretation and its limits:
  • Chi-square tells you whether an association exists; it does not tell you its strength, its direction, or whether it is causal
  • For strength one must calculate the relative risk or odds ratio with its confidence interval, and a good answer says so
  • A significant chi-square in a table larger than 2 × 2 tells you only that the groups differ somewhere, not which ones differ, which requires further examination of the cells
  • Like every test, its significance depends on sample size, so a trivial association becomes significant in a very large table
  • The chi-square test for trend is used where the exposure is ordered (dose categories, social class, age bands); it is more powerful than an ordinary chi-square because it uses the ordering, and it directly tests for a dose-response relationship, which is a Bradford Hill criterion
  • Its uses in community medicine — comparing attack rates in an outbreak, immunisation coverage between districts, outcomes between treatment groups, and the association between an exposure and a disease in a case-control study
  • Chi-square needs counts, not percentages, since the test depends entirely on the actual numbers
  • It tells you whether, not how strongly; the odds ratio or relative risk with an interval gives the strength
  • Expected equals row times column over grand total, which is the calculation to show rather than assert
  • A two by two table has one degree of freedom, from rows minus one times columns minus one
  • Use Fisher exact test for small numbers, which is preferable to Yates correction where expected counts are low
  • Yates correction makes the test more conservative by subtracting a half from the absolute difference
  • Paired categorical data need McNemar, since chi-square assumes each subject contributes to one cell only
  • Chi-square for trend uses the ordering and directly tests a dose-response relationship
  • A trend test is more powerful than an ordinary chi-square when the exposure categories are genuinely ordered
  • A significant result in a large table says the groups differ somewhere, not which ones differ
  • Combine sparse categories where sensible, which is often preferable to abandoning the analysis
  • It is the commonest test in community medicine, because so much public health data is categorical
  • Goodness of fit compares with a theoretical distribution, which is the second of its three applications

CLINICAL PEARL

Chi-square needs counts, not percentages. The test depends on the actual numbers, so feeding it proportions destroys it — and this is one of the commonest errors in student projects. Remember also what it does not tell you: it says an association exists but nothing about its strength or direction, for which the odds ratio or relative risk with a confidence interval is needed.

All questions in Biostatistics

  1. Q1Describe the scope of biostatistics, the types of data and their presentation. ★
  2. Q2Describe the measures of central tendency and dispersion. ★
  3. Q3Describe the normal distribution and the use of confidence intervals. ★
  4. Q4Describe the tests of significance and the principles of hypothesis testing. ★
  5. Q5Describe correlation and regression with their uses and limitations. ★
  6. SN1Describe the chi-square test and its applications. ★
  7. SN2Describe the Student t test and its applications. ★
  8. SN3Describe type I and type II errors and the power of a study. ★
  9. SN4Describe the non-parametric tests and their uses. ★
  10. SN5Describe vital statistics and their sources in India. ★
  11. SN6Describe the life table and the principles of survival analysis. ★
  12. SN7Describe the critical appraisal of medical literature.

Every Community Medicine chapter →

Scroll to Top