Chi-square test of independence (or Fisher’s exact test)

When to use it

It checks whether two categorical variables are associated, using a contingency table of counts.

It is a nonparametric test.

Assumptions

  • Both variables are categorical
  • Observations are independent

Test statistic

χ2=∑(Oij−Eij)2Eij\chi^2 = \sum \frac{(O_{ij} - E_{ij})^2}{E_{ij}}

Learn more

← Which statistical test should I use?