- Introduced by
- Fisher (1935); mid-p extension by Lancaster (1961) and others
- Year
- 1935 (base); mid-p robustification 1961+
- Type
- Robust exact conditional test
- Family
- Classical statistics
What does it do?
The robust Fisher's exact test is the mid-p variant of Fisher's exact test for contingency tables.
It keeps the conditional, exact framework of the standard test but counts only half the probability of the observed table in the tail sum, which reduces the conservatism of the standard test in small and sparse samples. Its Type I error rate is not guaranteed to stay below the nominal level, so it is a trade-off rather than a free improvement.
The intuition behind the method
Fisher's exact test is valid but often conservative. Because the hypergeometric distribution is discrete, its achieved rejection rate can fall well below the nominal alpha. The mid-p version adds only half the probability of the observed table to the tail sum, which moves the realised error rate closer to alpha and recovers some power. The price is that error control becomes approximate rather than strictly guaranteed, so the choice should be made knowingly.
History
Ronald A. Fisher introduced the exact test for 2×2 tables as a way to test association without large-sample approximations. Because the exact test rests on a discrete distribution, it is conservative. H. O. Lancaster (1961) proposed the mid probability as a significance criterion for discrete distributions, and discussed chi-square-based approximations to it for the binomial, Poisson and hypergeometric distributions. Its use as a mid-p correction to Fisher's exact test is a later development.
When to use it
Consider the robust (mid-p) Fisher test when you have a 2×2 or small r×c table in which chi-square approximations are doubtful because counts are small or sparse, and the standard Fisher test appears too conservative for your study. Conditioning on both margins is appropriate only when the row and column totals are fixed by the design, as Fisher's framework assumes. For unmatched case-control data, check whether the margins are fixed before using this conditional test. Do not use it for a large table with adequate expected counts, where a standard chi-square test is simpler and equally adequate. If the row totals are genuinely random, an unconditional test such as Barnard's is the more natural choice. If strict control of the Type I error is required, the standard Fisher test may be preferred.
Limitations and considerations
- Because it counts only half the probability of the observed table, the Type I error rate may slightly exceed the nominal level in some configurations, so the test is not strictly conservative.
- Conditioning on both margins is a design assumption; when the margins are random, the conditional reference distribution may not be the most appropriate, and Barnard's unconditional test addresses that case.
- Two-sided mid-p conventions differ, so the chosen convention must be stated for the result to be reproducible.
- Reviewers familiar only with the standard Fisher test may ask for a justification of the mid-p choice in applied publications.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- It uses the exact hypergeometric distribution under fixed margins, so its p-values do not depend on a large-sample approximation for sparse tables.
- For the same table it gives smaller p-values than the standard Fisher test, which can recover power when the exact result is borderline.
- Because the change affects only the tail sum, the calculation remains that of Fisher's test and can be checked directly against it.
- Conditioning on both margins gives a clear reference distribution for designs in which those totals are fixed.
Applications
- Medical and clinical studies comparing treatment and control groups on binary outcomes with small sample sizes.
- Genetic association studies examining 2×2 allele frequency tables in sparse data.
- Epidemiological case-control studies evaluating exposure-disease association.
- Quality control settings where sample sizes are tightly constrained and exact methods are required.
- Rare event studies where large-sample chi-square approximations are not trustworthy.
How it works
How it works
The null hypothesis states that there is no association between the row and column categorical variables in the population; the two classification factors are independent. Under the null and conditioning on fixed marginal totals, the cell counts follow a hypergeometric distribution.
Formula
H_0: \text{no association between row and column variables}The probability of observing exactly k successes in the first row is given by the hypergeometric formula, where m is the first row total, N is the grand total, and n is the first column total. All hypergeometric probabilities as extreme as or more extreme than the observed table are summed for the standard Fisher p-value.
Formula
P(X = k) = \dfrac{\binom{m}{k}\binom{N-m}{n-k}}{\binom{N}{n}}The mid-p correction replaces the full tail sum with one that includes only half the probability of the observed table: the probability of outcomes more extreme than observed, plus half the probability of the observed outcome itself. This gives a smaller p-value than the standard exact test and so reduces over-conservatism. The formula shown is for a one-sided tail. For a two-sided test, several conventions exist for combining the two tails, and the convention applied must be stated when reporting the result. Barnard's unconditional test is a different approach that does not condition on the margins, not a mid-p variant.
Formula
p_{\text{mid}} = P(X > k_{\text{obs}}) + \tfrac{1}{2}P(X = k_{\text{obs}})If the mid-p adjusted p-value is below the chosen alpha (commonly 0.05), the null hypothesis of no association is rejected. Report the odds ratio with a confidence interval, because a p-value alone does not indicate the size of the association. Conditional maximum likelihood estimates are the usual point estimate in this framework, and mid-p based intervals are also used; the interval chosen should be stated.
Formula
\text{reject } H_0 \text{ if } p_{\text{mid}} < \alphaCommon pitfalls
- Applying the robust (mid-p) Fisher test to large tables where chi-square is perfectly adequate, adding unnecessary complexity.
- Confusing the mid-p correction with the Yates continuity correction — these address different issues and should not be combined.
- Interpreting a non-significant mid-p result as proving independence rather than merely failing to reject it.
- Reporting only the p-value without the odds ratio and confidence interval, which are necessary for practical interpretation.
- Using the conditional Fisher framework when marginals are genuinely random — in that case Barnard's unconditional test is theoretically more appropriate.
Frequently asked questions
When should I prefer the robust Fisher test over the standard Fisher's exact test?
When you are concerned that the standard Fisher test is too conservative — rejecting too rarely — you can use the mid-p version to gain statistical power. This is most relevant when the result is borderline and the design fixes the margins as Fisher's framework assumes. Because the mid-p test is not strictly conservative, the choice should be justified in the report.
Is the mid-p correction the same as a continuity correction?
No. The Yates continuity correction is applied to the chi-square test statistic to approximate the exact distribution. The mid-p correction is applied directly to the hypergeometric tail probability in Fisher's exact framework, counting half the probability of the observed outcome. They address different problems and should not be used together.
Does the mid-p test still control Type I error?
Not strictly. The mid-p test is not strictly conservative: in some configurations the true Type I error rate can slightly exceed the nominal level. The standard Fisher test does not have this property, so the trade-off between power and strict error control should be considered for the specific study.
What is the difference between Barnard's test and the robust Fisher test?
They differ in their conditioning principle. The Fisher test and its mid-p variant condition on both marginal totals being fixed, which suits designs where those totals are set in advance. Barnard's unconditional test conditions on neither margin and is generally considered more appropriate when the margins are random.
What effect size should I report alongside this test?
Report the odds ratio (OR) with its 95% confidence interval. The conditional maximum likelihood estimate of the OR is consistent with the Fisher exact framework. Mid-p based intervals for the OR are also used; whichever interval is chosen should be stated, since different intervals can give different coverage.
Related methods
Sources
Agresti, A. (2002). Categorical Data Analysis (2nd ed.). Wiley-Interscience.
ISBN: 978-0471360933Lancaster, H. O. (1961). Significance tests in discrete distributions. Journal of the American Statistical Association, 56(294), 223–234.
Open DOI reference