unspurious.calculators

Hypothesis testing · Categorical data

Chi-Square Test Calculator

Test for an association in a contingency table, or whether counts fit expected proportions (goodness-of-fit). You get χ², df, the p-value, an effect size, and a clear note on what a significant table does and doesn't establish.

Result

In plain English

A chi-square test checks whether two categories are linked, by comparing the counts you actually saw with the counts you'd expect if the two had nothing to do with each other.

observed vs expected
“Expected” is what each cell would hold if the variables were unrelated. The test measures how far the real counts stray from that.
χ² statistic
The total mismatch between observed and expected counts. Bigger = more evidence of a link.
p-value
How often a mismatch this big would crop up by chance if there were genuinely no association.
Cramér's V
The strength of the association, from 0 (none) to 1 (perfect) — χ² alone only tells you whether a link exists, not how strong.
goodness-of-fit
The other mode: instead of two variables, it checks whether one set of counts matches a distribution you expected (e.g. a fair die).

Frequently asked

When is the chi-square test unreliable?

When expected cell counts are small — the usual rule is that every expected count should be at least 5. For a sparse 2×2 use Fisher's exact test instead, or pool categories.

What's the difference between the two chi-square tests?

The test of independence checks whether two categorical variables in a table are associated; the goodness-of-fit test checks whether one set of counts matches an expected distribution (like a fair die). This calculator does both.

What does Cramér's V add?

χ² only tells you whether an association exists, and it grows with sample size; Cramér's V measures how strong it is, from 0 to 1, so a “significant” table doesn't fool you into thinking the effect is large.

What is the difference between chi-square and Fisher’s exact test?

Both test for association in a contingency table, but the chi-square test uses a large-sample approximation that wobbles when expected counts are small (a common rule is below 5). Fisher’s exact test computes the probability exactly from the hypergeometric distribution, so it is the right choice for small or sparse tables. For large tables with healthy counts the two agree closely — use chi-square for convenience there and Fisher’s when any cell is thin.