Module 4 · Lesson 17 of 22

Chi-square association testing

← Back to moduleBack to academy

Learning objectives

  • Build a contingency table for two categorical variables.
  • Check expected counts and interpret residuals.
  • Distinguish association from causation.

Chi-square association

H0 is independence between the two categorical variables. Compare observed and expected counts; large discrepancies produce a large chi-square statistic.

Use counts (not percentages), independent observations, mutually exclusive categories and adequate expected counts.

Garment-factory example

Test whether defect-type distribution differs by production line, using counts (not percentages) per cell.

Method

  1. Cross-tabulate raw counts.
  2. Compute expected counts.
  3. Run the test in a free tool.
  4. Inspect standardised residuals to see which cells drive association.

Common mistakes

  • Entering percentages instead of counts.
  • Treating association as causation.

Knowledge check

Pick one answer per question. Explanations appear after you submit.

  1. 1. The chi-square association test requires:

  2. 2. Standardised residuals help to:

Author: Sanjeewa Dehiwalage · Last reviewed: 2026-07-21

Stay in touch

New chapters, delivered quietly.

A short note when a new story, reflection or milestone is added. No noise, no spam — unsubscribe with a single click.