Barnard's Exact Test
Barnard's Unconditional Exact Test for 2×2 Tables · Also known as: Barnard test, unconditional exact test, CSM test, Barnard's exact unconditional test, Barnard's test of homogeneity
Barnard's exact test is an unconditional exact hypothesis test for comparing two independent proportions in a 2×2 contingency table, proposed by George A. Barnard in 1945. Unlike Fisher's exact test, it does not condition on both margins being fixed, and is generally more powerful when column totals are not predetermined by the study design.
Read the full method
Sign in with a free account to read this section.
When to use it
Use Barnard's exact test when comparing two independent groups on a binary outcome and at least one cell count is small (commonly a cell count below 5), making large-sample chi-squared approximations unreliable. It is most appropriate when only the row totals (group sizes) are fixed by the study design — as is typical in randomized controlled trials and prospective cohort studies — and the column totals are free to vary. It is not appropriate when both margins are genuinely fixed (as in matched-pair designs, where McNemar's test applies) or for tables larger than 2×2.
Strengths & limitations
- More powerful than Fisher's exact test in most practical settings with unfixed column margins, particularly in small samples.
- Provides an exact (non-asymptotic) p-value that guarantees the nominal Type I error rate.
- Does not require large-sample assumptions and outperforms the chi-squared test when expected cell counts are small.
- Naturally aligned with the design of prospective studies and randomized trials where only group sizes are pre-specified.
- Computationally intensive: the nuisance-parameter optimization requires evaluating the rejection region over a fine grid of π values.
- Can be conservative in some configurations because the discrete nature of the data means the actual Type I error rate may be strictly below α.
- Not valid when both margins are fixed by design; Fisher's exact test is the appropriate choice in that case.
- Results depend on which test statistic is used to order tables; different choices (pooled z, unpooled z, odds ratio) can yield somewhat different p-values.
Frequently asked
Why is Barnard's test more powerful than Fisher's exact test?
Fisher's exact test conditions on both the row and column totals being fixed, which is a stronger constraint than the study design typically imposes. By treating the common success probability as a free nuisance parameter and maximizing over it, Barnard's test uses more of the information in the data, resulting in a rejection region that is generally larger and a p-value that is generally smaller for the same observed table.
When should I still prefer Fisher's exact test?
Use Fisher's exact test when both sets of marginal totals are genuinely fixed before data collection — for example, in a case-control study where the number of cases and controls is predetermined and the exposure count is also fixed. In that design the conditional distribution is the correct reference, and Barnard's test would not be appropriate.
What is the Boschloo test and how does it relate to Barnard's test?
The Boschloo test (1970) is a variant of the unconditional exact framework that uses Fisher's p-value as the ordering statistic instead of the pooled z statistic. It is uniformly more powerful than Fisher's exact test and is often slightly more powerful than the classical Barnard test with the z statistic. Both belong to the same unconditional exact family.
Does the test require equal group sizes?
No. Barnard's test is valid for any combination of group sizes n₁ and n₂. However, statistical power is maximized when the two groups are of roughly equal size, all else being equal, just as with other two-proportion tests.
Sources
- Barnard, G. A. (1945). A new test for 2×2 tables. Nature, 156(3954), 177. DOI: 10.1038/156177a0 ↗
- Suissa, S., & Shuster, J. J. (1985). Exact unconditional sample sizes for the 2×2 binomial trial. Journal of the Royal Statistical Society, Series A, 148(4), 317–327. DOI: 10.2307/2981892 ↗
- Lydersen, S., Fagerland, M. W., & Laake, P. (2009). Recommended tests for association in 2×2 tables. Statistics in Medicine, 28(7), 1159–1175. DOI: 10.1002/sim.3531 ↗
How to cite this page
ScholarGate. (2026, June 3). Barnard's Unconditional Exact Test for 2×2 Tables. ScholarGate. https://scholargate.app/en/statistics/barnard-s-exact-test