← Back to Statistics
Chi-Square Tests

Chi-Square Test

Test association between categorical variables in a contingency table.

Calculation engine
Client-side JavaScript; no external statistics package is loaded.
Results are calculated in the browser and are not uploaded.

Method overview

When to use

Use for count data arranged in rows and columns, such as exposure by outcome.

Input requirements

Enter a contingency table. Each row is a line; cells are separated by commas, spaces, or tabs.

Key assumptions

  • Data are frequency counts, not percentages.
  • Categories are mutually exclusive.
  • Expected counts should generally not be too small; consider Fisher’s exact test for very small 2×2 tables.

Null hypothesis

H₀: the row variable and column variable are independent.

Method used

Pearson chi-square statistic with (rows−1)×(columns−1) degrees of freedom.

References

  • Pearson K. On the criterion that a given system of deviations... Philosophical Magazine, 1900.

Data input and results

Enter observed frequency counts directly into the table. Use counts only, not percentages. Increase rows or columns if needed.

No calculation has been performed.