Inferential Statistics • Lesson 17

Chi-Square Tests

Concept 1

What Is a Chi-Square Test?

Chi-square tests are commonly used with categorical data. They compare observed frequencies with frequencies that would be expected under a particular hypothesis.

Visual Explanation

Observed vs Expected

Start with the data type
DATA
Categories
→
MEASURE
Frequencies
Core question
Observed vs Expected
Key Idea
OBSERVED
What actually happened
        ↓
       χ²
        ↑
EXPECTED
What H₀ predicts

The central idea is to compare what was observed with what would be expected if the null hypothesis were true.

Activity

A company records how many customers choose Cash, Card, UPI, or Wallet. Which type of statistical test is relevant?

Hint

The variable is categorical and the data are frequencies or counts.

Analyst Workflow
1
Identify the data
2
Find expected counts
3
Calculate χ²
4
Find degrees of freedom
5
Interpret p-value
Quick Reference
CHI-SQUARE STATISTIC
χ² = Σ (O − E)² / E
GOODNESS-OF-FIT
df = k − 1
INDEPENDENCE
df = (r − 1)(c − 1)
EXPECTED COUNT
(Row × Column) / Grand Total
Important Conditions
✓

The data should be categorical counts or frequencies.

✓

Observations should be appropriately independent for the study design.

✓

Expected cell counts should generally be sufficiently large for the usual chi-square approximation.

✓

Very small expected counts can make the chi-square approximation unreliable.

✓

The test should match the research question: goodness-of-fit or independence.