Course contentsShow
← Data Science
Lesson 428 of 2,14511. Hypothesis Tests for Proportions and CategoriesFree lesson

Post-Hoc Analysis and Residuals

Learn how to examine standardized residuals to identify which cells contribute most to significant associations.

Post-Hoc Analysis and Residuals

What You'll Learn

You'll learn how to dig deeper after a significant Chi-Squared test by examining standardized residuals to pinpoint exactly which cells in your contingency table are driving the association.

Why Post-Hoc Analysis Matters

When your Chi-Squared test of independence returns a significant result, it tells you that something in your contingency table differs from what you'd expect under independence. But which cells? A significant test doesn't tell you where the action is—it's like a smoke detector going off without telling you which room has the fire.

What Are Standardized Residuals?

For each cell in your contingency table, the standardized residual measures how far the observed count deviates from the expected count, in standardized units (similar to z-scores).

The formula captures:

  • Observed - Expected: the raw difference
  • Standardized: divided by the standard error of that cell

Values beyond ±2 (or ±3 for stricter criteria) indicate cells contributing significantly to the overall Chi-Squared statistic.

How to Use Them

  1. Calculate standardized residuals for each cell after your significant Chi-Squared test
  2. Identify cells with residuals beyond ±2 (moderate) or ±3 (strong)
  3. Interpret: Positive residuals mean more observations than expected; negative means fewer
  4. Focus your conclusions on these specific relationships

Think of it like examining which ingredients made a dish taste "off"—the overall test says something's wrong, but residuals tell you it's specifically the salt and garlic.

Key Takeaway: Standardized residuals transform a general "there's an association" into specific insights about which categories are over- or under-represented, letting you tell a precise story about your categorical data relationships.