Opening your learning space
Starting the app …
Opening your learning space
Starting the app …
For a 2×2 contingency table, Fisher’s exact test evaluates conditional independence using the hypergeometric distribution with fixed margins.
Free to browse · flashcards or a multiple-choice quiz · import from Essential
Formula
N, K, n, x and cell values are nonnegative integer counts · probability is dimensionless
| Symbol | Meaning | Unit |
|---|---|---|
| Total count in the 2×2 table | people or cases | |
| Total count with the specified column outcome | events | |
| Size of the specified row group | events | |
| Random cell count under fixed margins | events | |
| Observed cell count | events |
P(X=x)=\frac{\binom{K}{x}\binom{N-K}{n-x}}{\binom{N}{n}}Under independence, conditional on observed margins, a cell count is hypergeometric. A one-sided p-value sums probabilities of tables at least as extreme in the declared direction. Two-sided implementations may use probability-ordering or another convention, so report which definition was used. The test provides evidence against independence, not an effect size, directional causation or automatic correction for multiple testing.
The 2×2 table and observed margins are fixed; the two-sided extremeness convention is stated.
Under independence, a cell count with fixed margins follows a hypergeometric distribution.
Rearrange for combinatorial denominator
Use combinations; observations are unordered draws.
Table [[8,2],[1,5]]. Calculate P(X=8) with fixed margins.
C(9,8)·C(7,2)/C(16,10)=189/8008≈0.0236.
Equating probability of the observed table with the two-sided p-value.
For a p-value, sum all feasible tables at least as extreme under the stated rule.
Formula cluster
small p-values under fixed margins count against independence but do not measure effect size.
For table [[8,2],[1,5]], N=16, K=9 and n=10. The probability of x=8 is C(9,8)·C(7,2)/C(16,10)=189/8008≈0.0236. Under the two-sided probability-ordering convention, probabilities of equally or less likely feasible tables are added; here p≈0.035. Check: every summed table keeps the same margins.
Test association between categorical variables in small samples or sparse 2×2 tables
Here is how to work through a typical Fisher's Exact Test (P(X=x | Ränder) = C(K,x)C(N−K,n−x)/C(N,n)) task step by step:
Task
Table [[8,2],[1,5]]. Calculate P(X=8) with fixed margins.
Solution path
C(9,8)·C(7,2)/C(16,10)=189/8008≈0.0236.
a conditional exact test of independence for categorical data in a 2×2 table. Its output is table probabilities and a p-value defined by an extremeness rule.. small p-values under fixed margins count against independence but do not measure effect size. The quantity answers a specific biological or statistical question, not automatically the full cause of an observed pattern. Tie it to the population, sample or model level from which inputs came. A number without that reference can be misleading across studies. Keep description separate from explanation: the metric summarizes data but does not by itself establish the underlying mechanism.
Use N is total, K a column margin, n a row margin and X a random cell count. The units are inputs are integer counts; hypergeometric probability lies between zero and one.. Check that numerator and denominator refer to the same time interval, target population and scale. Proportions entered as percentages usually need conversion to values between zero and one. Write units and definitions beside the observations. This helps catch swapped groups, mismatched age intervals or a wrong denominator before they distort the result. Also document measurement definitions and preprocessing, because studies can operationalize the same symbols differently.
The central assumption is: margins are conditioned on under the null and observations are independent. table structure and one- or two-sided rule are specified before interpretation. If different software definitions for two-sided tests sum different tables., interpretation changes or the formula no longer fits. State sampling, measurement method and biological scale. A model is useful because it simplifies a question, but its limits belong in the report. Do not automatically transfer parameters to different species, populations, laboratories or sampling conditions. Report these assumptions with the result so readers can judge which populations and conditions the conclusion can cover.
In the example, the observed table has probability 189/8008≈0.0236. The check is: the two-sided value sums additional rare tables and can therefore be larger. Substitute calculated values back into the original relation and check whether ranges and units are biologically plausible. Rounded data can create a small discrepancy, but should not change direction or order of magnitude. Also test a simple limiting case, such as zero, complete detection or equal groups. This separates arithmetic errors from model limitations. Round intermediate values only at the end, and check the order of magnitude against the biological question.
A nearby quantity is Pearson chi-square test of independence. The substantive distinction is that Fisher uses conditional discrete probabilities; chi-square approximates the sampling distribution. Both can appear in the same biological analysis, but they use different inputs and answer different questions. Choose by the requested output and verify the data definition before comparing values. A related name does not imply identical units or interchangeable interpretation. This matters when a descriptive statistic is reported alongside a model parameter. Before comparing values, align definitions, populations, observation periods and analysis rules; otherwise the difference may be methodological.
Quanta exam set
Curated exam set for "Fisher's Exact Test":
Question (front)
Which formula describes Fisher's Exact Test?
Answer in your set
Question (front)
How do you rearrange Fisher's Exact Test for Rearrange for combinatorial denominator?
Answer in your set
Question (front)
Which common mistake happens with Fisher's Exact Test?
Answer in your set
+ 8 more cards: units, variables, derivation, example, exam task
The formula set contains 11 cards. After importing, review them and start practicing; your ratings determine later review intervals.
This list names subject references and further reading. A page or section number appears when it is part of the reference; these are not verbatim quotations.
Create a curated FSRS exam set for P(X=x | Ränder) = C(K,x)C(N−K,n−x)/C(N,n): formula recall, variables, derivation, rearrangement, worked example, common mistakes and exam context.
Curated formula set · LaTeX · FSRS spaced repetition · import from Essential