🧪 Chi-Square Test Lab — Fit & Independence

The workhorse test for counting data: does an observed distribution match what theory predicts (goodness of fit), and are two categorical variables related (contingency test)? Live contributions, χ², degrees of freedom, p-value from the incomplete-gamma function, critical values and effect sizes — no lookup table needed.

CategoryObservedExpected
Add at least two categories with counts, or a contingency table.

Rules of thumb before you believe a p-value: independent counts (one observation per subject), fixed totals decided before you saw the data, and expected counts ≥5 in at least 80% of cells — the warnings below flag it when that breaks. χ² tests are always upper-tailed.