Research ToolsChi-square / Fisher

Chi-square / Fisher's Exact Test

Test whether categorical variables are associated (contingency table). Supports the Pearson chi-square for any R×C table; for a 2×2 table it also gives Yates' continuity-corrected chi-square and Fisher's exact test (two-sided), with a warning when expected counts are too small.

① Enter the contingency table

One row of counts per line (a line is one table row); numbers separated by spaces or commas. For a 2×2 table, enter two lines of two numbers each.

How to use & methodology

What is the chi-square test for?

It tests whether two (or more) categorical variables are associated — for example whether positive rates differ across groups. Data are entered as a contingency (frequency) table.

Why look at Yates and Fisher for a 2×2 table?

With a small sample, the Pearson chi-square overstates significance for a 2×2 table. Yates' continuity correction partly fixes this; when expected counts are very small or the total is small, Fisher's exact test is most reliable.

What does the small-expected-count warning mean?

The chi-square test requires expected counts that are not too small (a common rule is at least 5). If warned, the Pearson chi-square may be unreliable — use Fisher's exact test or merge categories.

Can it handle larger tables?

Yes. Any R×C table gives the Pearson chi-square, degrees of freedom and p-value. Yates correction and Fisher's exact test apply only to 2×2 tables.