Skip to main content
Back to Statistics

Statistics · Hypothesis Testing

Chi Square and Categorical Tests

The one idea: Every t-test and Z-test needs a mean — which means it needs numbers you can average. Chi-square is the tool for when your data is categories, not numbers: yes/no, plan tier, region, device type. It works by comparing what you actually observed in each category to what pure chance would have produced, and asking whether the gap is too big to be coincidence.
⚠️ The trap: "We ran a chi-square test on plan tier vs. churn and got a significant result, so switching everyone to annual plans will cut churn." A significant chi-square only says two categorical variables are associated — it says nothing about which one drives the other, or whether a third factor (say, company size) drives both. Chi-square tells you variables move together in a way chance wouldn't produce; it never tells you why, and treating an association as a lever you can pull is the same causal leap correlation makes with continuous numbers.

Why chi-square exists: categories don't have means

A t-test needs an average caseload, an average score, an average weekly spend — a number you can meaningfully add up and divide. But plenty of real business data isn't numeric at all: which plan a customer picked, whether they churned, which region they're in, whether a part passed inspection. You can't take the "mean" of "West region." Chi-square (χ²) is the workhorse for exactly this: it tests relationships between categorical (nominal or ordinal) variables by comparing counts, not averages.

Chi-square comes in two flavors that use the identical formula but ask different questions:

  • Goodness-of-fit test: does one categorical variable follow a hypothesized distribution?…

Keep reading: Chi Square and Categorical Tests

Unlock the full Statistics track — every lesson, the AI tutor, and full mock assessments.

  • Full lesson content
  • AI tutor for this section
  • Practice questions