Wize Introductory Statistics Textbook > Chi-Square Tests

Inference for Two Categorical Variables: Chi-Square

Build Expected Counts From Margins, Then Test Independence

For a two-way table, the independence model gives expected count = row total × column total / grand total. Expected counts are model quantities, not the observed counts sorted differently.


The statistic χ² adds (observed − expected)² / expected across cells. For an r by c table, degrees of freedom are (r−1)(c−1). Large discrepancies relative to expected counts give larger contributions.


A small p-value is evidence against population independence under the sampling and approximation conditions. It does not establish causal direction, mechanism, or absence of confounding.

A 2 × 3 table has row total 45, column total 32, and grand total 120. What is the expected count in their intersection under independence?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

For a 4 × 2 contingency table, what are the degrees of freedom for a chi-square test of independence?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A chi-square independence test gives p = 0.004. What conclusion is justified at α = 0.05?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors