EasyDeepLearn

Chi-square test of independence — what does it do?

medium

Answer

  • Tests whether two categorical variables are independent, given an r × c contingency table.
  • Statistic: χ2  =  Σ{\chi}^{2}\; = \;{\Sigma} (Oij    Eij)2  /  Eij(O_{\mathrm{ij}}\; - \;E_{\mathrm{ij}})^{2}\; / \;E_{\mathrm{ij}}, where Eij  =  rowi    colj  /  NE_{\mathrm{ij}}\; = \;\mathrm{row}_{i}\; \cdot \;\mathrm{col}_{j}\; / \;N under independence. df = (r-1)(c-1).
  • Requires EijE_{\mathrm{ij}} ≥ 5 for validity.
  • Use case: is conversion rate independent of region?
  • For small counts, use Fisher's exact test instead.
Check yourself — multiple choice
  • For continuous data
  • χ2  =  Σ{\chi}^{2}\; = \;{\Sigma} (OE)2/E(O - E)^{2} / E on contingency table; independence null; df=(r-1)(c-1); needs E ≥ 5 or use Fisher exact
  • Only 2×2 tables
  • Same as t-test

Chi-square independence: contingency table, E ≥ 5, else Fisher exact.

#hypothesis-testing#parametric-tests

Practise Statistics Fundamentals

215 interview questions in this topic.

Related questions