How this calculation works
Hold the observed row and column margins fixed and enumerate all feasible top-left counts. For the two-sided option, sum tables with probability no greater than the observed table’s probability.
Conditional table probability = choose(column-one total, a) × choose(column-two total, row-one total − a) / choose(grand total, row-one total)A worked example
For [1,9;11,3], probability-ordered two-sided Fisher evidence is about 0.002759456. The raw sample odds ratio is 1×3/(9×11), about 0.030303.
Good to know
Conditional inference for independent count observations, with total at most 2,000. No paired-data model, conditional odds-ratio estimate, interval or causal interpretation.
Reference: R statistical documentation: Fisher exact test (opens in a new tab) ↗
Fix the margins before defining the tail
The reference tables preserve both observed row totals and both column totals. Only the top-left count varies; the remaining cells follow from those margins.
That conditional reference model is different from a binomial analysis with a freely varying total or a paired before/after analysis.
The chi square contingency independence calculator adds calculate Pearson independence evidence for rectangular count tables, with expected cells, residual contributions, sparse-cell counts and Cramér’s V.
Two-sided exact definitions are not all identical
This page uses probability ordering: include feasible tables no more probable than the observed one. It is not defined by automatically doubling a one-sided tail.
The enumeration table shows which outcomes enter the selected tail. A small numerical tolerance handles probabilities that should tie but differ by floating-point rounding.
Separate sample odds ratio from conditional inference
The displayed odds ratio is the cross-product sample ratio. It is not a conditional maximum-likelihood estimate and does not include a confidence interval.
When a denominator product is zero, the ratio can be infinite or undefined; the page labels that case instead of adding an undisclosed continuity adjustment.
Use the result with the next measurement
The chi square contingency independence calculator uses an asymptotic Pearson statistic and supports larger rectangular tables. That p value is not the same conditional calculation as Fisher’s enumeration.
Conditional inference for independent count observations, with total at most 2,000. No paired-data model, conditional odds-ratio estimate, interval or causal interpretation.
A few questions, answered
Is two-sided p always twice the smaller tail?
Not under this probability-ordering definition.
Is the odds ratio conditionally estimated?
No, the display is the raw cross-product sample ratio.
Are zero cells allowed?
Yes, provided the total is positive and within the supported bound.