Fiveable

๐ŸŽฒIntro to Statistics Unit 11 Review

QR code for Intro to Statistics practice questions

11.3 Test of Independence

๐ŸŽฒIntro to Statistics
Unit 11 Review

11.3 Test of Independence

Written by the Fiveable Content Team โ€ข Last updated September 2025
Written by the Fiveable Content Team โ€ข Last updated September 2025
๐ŸŽฒIntro to Statistics
Unit & Topic Study Guides

The chi-square test of independence helps us figure out if two categorical variables are related. We use observed and expected frequencies to calculate a test statistic, which we compare to a critical value to make a decision.

This test is crucial for understanding relationships between variables in real-world scenarios. By analyzing contingency tables and interpreting results, we can draw meaningful conclusions about associations in our data.

Chi-Square Test of Independence

Test statistic calculation for independence

  • Calculate chi-square test statistic using formula $\chi^2 = \sum \frac{(O - E)^2}{E}$
    • $O$ observed frequency in each cell of contingency table (actual counts)
    • $E$ expected frequency in each cell of contingency table (theoretical counts assuming independence)
  • Determine expected frequency for each cell
    • Multiply row total by column total divide by grand total
    • Formula $E = \frac{(\text{row total}) \times (\text{column total})}{\text{grand total}}$
  • Calculate degrees of freedom $(r - 1)(c - 1)$
    • $r$ number of rows in contingency table (categories of one variable)
    • $c$ number of columns in contingency table (categories of other variable)

Interpretation of independence test results

  • Test of independence assesses relationship between two categorical variables
  • Null hypothesis ($H_0$) variables are independent (no association)
  • Alternative hypothesis ($H_a$) variables are not independent (associated)
  • Compare calculated chi-square test statistic to critical value from chi-square distribution table
    • Use degrees of freedom significance level (0.05) to find critical value
  • If calculated chi-square test statistic > critical value reject null hypothesis
    • Sufficient evidence to suggest variables are not independent (associated)
  • If calculated chi-square test statistic < critical value fail to reject null hypothesis
    • Insufficient evidence to suggest variables are associated (independent)

Chi-square analysis in real-world scenarios

  • Identify categorical variables of interest in real-world scenario (gender, age group)
  • Construct contingency table with observed frequencies for each category combination
  • Calculate expected frequencies for each cell in contingency table
  • Calculate chi-square test statistic using observed expected frequencies
  • Determine degrees of freedom based on number of rows columns in contingency table
  • Choose significance level (0.05) find critical value from chi-square distribution table
  • Compare calculated chi-square test statistic to critical value make conclusion about variable relationship
    • If test statistic > critical value conclude variables are associated (preference, behavior)
    • If test statistic < critical value conclude insufficient evidence to suggest association between variables (independence)

Statistical Inference and Hypothesis Testing

  • Chi-square test of independence is a form of statistical inference
  • Uses sample data to draw conclusions about population parameters
  • Follows hypothesis testing framework to make decisions about independence or association
  • Relies on probability distribution (chi-square distribution) to determine critical values
  • Chi-square test is a nonparametric test, making fewer assumptions about the underlying population distribution