Fisher's Exact Test
Run an exact fixed-margin 2 by 2 count test with odds ratio, p-value, and support table.
At a glance
- Computes
- Exact p-value for a two by two table, plus the odds ratio.
- You supply
- The four cell counts, an alternative, and a significance level.
- Use when
- A two by two table with small expected counts, where chi-square is unsafe.
- Not for
- Tables larger than two by two, or expected counts above five. Chi-Square Test Calculator
Density by Top-left cell count; 3 bins of width 1 (fd rule); P-value tail; Observed count 1
p-value
Enter counts
Fisher exact test, fixed margins.
| Metric | Value |
|---|
| x | Table probability | Included |
|---|
P(X = x) = choose(n,x) choose(M-n,N-x) / choose(M,N)
How?
How this is calculated
Fisher's exact test fixes the row and column margins, then sums hypergeometric table probabilities from that fixed-margin support. The two-sided p-value includes tables with probability no larger than the observed table probability.
Formula: P(X = x) = choose(n,x) choose(M-n,N-x) / choose(M,N)
Sources
- SciPy fisher_exact. SciPy. Retrieved .
- R fisher.test. R Documentation. Retrieved .
Method last reviewed