Fisher's Exact Test Calculator
Calculate precise p-values for 2x2 contingency tables using large-integer factorial logic. Ideal for small sample sizes in medical and scientific research.
Contingency Table (2x2)
Probability of association (any direction)
Probability of this specific direction
About
In statistical analysis, standard Chi-Square tests fail when sample sizes are small or when the cells of a contingency table are sparse (values less than 5). The Fisher's Exact Test solves this by calculating the exact probability of observing the specific distribution of data, rather than relying on an approximation. It is the gold standard for clinical trials, A/B testing with low traffic, and genetic studies.
This tool computes the p-value using arbitrary-precision arithmetic (BigInt), ensuring accuracy even when factorials become astronomically large. It checks the null hypothesis that there is no association between the two categorical variables defined in the grid. The output provides both one-tailed (directional) and two-tailed (non-directional) significance values along with a plain-English interpretation.
Formulas
The probability (p) of observing any specific 2x2 table configuration is given by the hypergeometric distribution:
p = (a+b)! (c+d)! (a+c)! (b+d)!a! b! c! d! n!
Where n! represents the factorial of n. The P-value is the sum of probabilities for all tables that are as extreme or more extreme than the observed table, given the fixed marginal totals.
Reference Data
| Group | Outcome Positive (Yes) | Outcome Negative (No) | Row Total |
|---|---|---|---|
| Group 1 | a | b | a + b |
| Group 2 | c | d | c + d |
| Column Total | a + c | b + d | n (Total) |