Skip to content

Categorical

Pearson's χ² test

Tests association between two categorical variables.

Variables

  • Row variableNominal · Ordinal — 1
  • Column variableNominal · Ordinal — 1

Options

  • Chi-square methodN−1 chi-square · Pearson chi-square · Likelihood ratio (G²)
  • Fisher’s exact test

What it reports

2×2 and r×c tables; φ or Cramér's V; expected counts shown.

scipy · formula · Open the accuracy report

When does this apply?

For testing the association between two categorical (nominal or ordinal) variables; they are cross-tabulated into cells, and the expected frequency is shown for every cell. The output is χ², the degrees of freedom, p, and φ or Cramér’s V with a confidence interval; for a 2×2 table, proportions, risk measures and NNT are computed as well. Fisher’s exact test is offered as a separate option and is never switched on automatically.

Related analyses

Research articleOAK-compliant article