Chi-Square Test Calculator

Test goodness of fit or independence using the chi-square distribution.

Goodness of Fit

Contingency Table

Chi-Square Statistic
Enter data and calculate
χ² Value
Degrees of Freedom
p-Value
Critical Value
Decision
Cramér\'s V

Chi-Square Test

The chi-square test compares observed frequencies to expected frequencies to test hypotheses about categorical data.

Chi-Square Formula

χ² = Σ [(O - E)² / E]

Where O = observed frequency, E = expected frequency

Types of Chi-Square Tests

TestPurposedf
Goodness of FitTest if data fits a distributionk - 1
IndependenceTest relationship between variables(r-1)(c-1)

Assumptions

  • Data are counts/frequencies
  • Observations are independent
  • Expected frequency ≥ 5 for each cell
  • Sample size is sufficiently large

Frequently Asked Questions

When should I use chi-square test?
Use chi-square when testing relationships between categorical variables or comparing observed data to expected distributions. Not for continuous data.
What if expected frequencies are too small?
If any expected frequency is less than 5, consider using Fisher's Exact Test for contingency tables or combining categories.