Simulation and Resampling Methods

A biologist measures the median body mass of 14 rare salamanders. She needs a confidence interval. But no textbook formula exists for the standard error of a median. A geneticist compares gene expression between two tiny tissue samples. She cannot assume the data are normally distributed. A phylogeneticist builds one tree from DNA sequences. He wants to know how much to trust each branch. In all three cases, the classical machinery of Confidence Intervals and Hypothesis Testing has nothing to offer. That machinery is built on formulas that assume normality, large samples, or known distributions. Resampling methods solve this by turning the computer into a laboratory. Instead of deriving a sampling distribution mathematically, the biologist simulates it directly. She draws many new "pretend" datasets from the one dataset actually collected. Then she watches how a statistic behaves across them. The bootstrap rebuilds the sampling distribution of an estimate. It does this by resampling observations with replacement. The permutation test rebuilds the null distribution of a test statistic. It does this by reshuffling group labels. Both replace a mathematical derivation with a large number of simulated replicates. Often this means 10,000 or more, computed in seconds on a laptop. These tools matter enormously in modern biology because real data are messy. Examples include skewed body-size distributions and non-independent phylogenetic samples. Other examples include small sample sizes in endangered species research. Count data with excess zeros are common too. So are millions of correlated genomic markers. Classical formulas were derived under idealized assumptions. Biological data routinely violate these assumptions. Resampling methods make far weaker assumptions. Chiefly, they assume the sample is representative of the population (bootstrap). Or they assume group labels are exchangeable under the null (permutation). They still deliver valid confidence intervals and p-values. This article explains exactly how bootstrapping and permutation testing work mechanically. It walks through the classical papers and logic that established them as rigorous inference, not just clever tricks. It works two realistic examples end to end. One is a skewed ecological trait. The other is a small-sample genetic association. It closes by connecting resampling to the broader statistical toolkit. This includes a first glimpse of Bayesian Inference in Biology: An Introduction, where simulation plays an even larger role.

Key takeaways
  • Resampling methods build sampling or null distributions by simulation instead of formula, using the data (or reshuffled data) itself as the engine.
  • The bootstrap resamples observations with replacement to estimate the sampling distribution of a statistic (mean, median, correlation, ratio) and construct confidence intervals.
  • The permutation test shuffles group labels or pairings to build the null distribution of a test statistic when no group difference exists, yielding an exact or near-exact p-value.
  • Both scale to arbitrarily complex statistics (medians, odds ratios, phylogenetic bootstrap support, multiple-testing-corrected genomic scans) where classical formulas do not exist or do not apply.
  • Validity rests on specific assumptions: the bootstrap needs a representative sample; the permutation test needs exchangeability of labels under the null.
  • Modern genomics depends on these methods for phylogenetic bootstrap support values, permutation-based GWAS thresholds, and false discovery control in high-dimensional data.
The core insight

When no formula exists for a statistic's sampling or null distribution, simulate it directly by resampling the data itself thousands of times.

The core idea

Classical inference — the t-test, the normal-theory confidence interval, the chi-square test — works by deriving, mathematically, what the sampling distribution of a statistic would look like under stated assumptions (normality, independence, large n, known variance). Once that theoretical distribution is known, a p-value or a confidence interval follows from a formula or a lookup table. This works beautifully for means of reasonably-sized, roughly-normal samples. It fails, or becomes an approximation of unknown quality, for medians, ratios, correlation coefficients in small samples, maximum-likelihood estimates from complex models, and statistics computed on inherently non-independent data like phylogenies.

Resampling (also called computational or simulation-based inference) sidesteps the derivation entirely. Rather than asking "what distribution does theory predict?", it asks "what distribution do I actually get if I repeatedly resample from data structured like mine?" Two flavors dominate biological practice: The bootstrap, introduced by Bradley Efron in 1979, treats the observed sample as a stand-in for the population. It draws thousands of new samples of the same size, with replacement, from the original data, computes the statistic of interest (mean, median, regression slope, phylogenetic tree, allele frequency) on each resample, and uses the resulting spread of values to estimate standard error and construct a confidence interval — all without assuming a parametric form for the population. The permutation test, whose logic traces to Ronald Fisher's exact test (1935) and R.A. Fisher's discussion of the Lady Tasting Tea experiment, addresses hypothesis testing rather than estimation. Under the null hypothesis of no association or no group difference, the labels attached to observations (treatment vs. control, species A vs. species B) carry no real information — they are exchangeable. The test recomputes the statistic (a difference in means, a correlation, a chi-square statistic) after randomly reshuffling those labels thousands of times, building an empirical null distribution against which the actually observed statistic is judged. Both methods are forms of Monte Carlo inference: repeated random simulation used to approximate a quantity too hard to derive analytically.

Mechanism

Step-by-step: the nonparametric bootstrap for a confidence interval 1. Collect the original sample of n independent observations, e.g., body masses of 14 salamanders: x1,x2,…,x14x_1, x_2, \dots, x_{14}. 2. Compute the statistic of interest on the real data — say the sample median, θ^\hat{\theta}. 3. Generate a bootstrap resample: draw n observations from the original n, with replacement. Because sampling is with replacement, some original observations appear multiple times in a given resample and others are omitted entirely. On average, about 63.2% of the original observations appear at least once in each resample (this follows from 1−(1−1/n)n→1−e−11-(1-1/n)^n \to 1-e^{-1} as n grows). 4. Compute the same statistic (the median) on this resample: θ^1∗\hat{\theta}^{*}_1. 5. Repeat steps 3–4 a large number of times, B — typically B=1,000B = 1{,}000 to 10,00010{,}000 — producing a distribution of bootstrap replicate estimates θ^1∗,θ^2∗,…,θ^B∗\hat{\theta}^{*}_1, \hat{\theta}^{*}_2, \dots, \hat{\theta}^{*}_B. 6. This distribution of replicate estimates approximates the true sampling distribution of θ^\hat{\theta}. Its standard deviation estimates the bootstrap standard error of the statistic. 7. For a confidence interval, take the percentile method: the 2.5th and 97.5th percentiles of the BB bootstrap replicates form a 95% confidence interval. More refined variants — the bias-corrected and accelerated (BCa) interval — adjust for skew and bias in the bootstrap distribution and are preferred in practice for small or skewed samples.

Step-by-step: the permutation test for a two-group comparison 1. Collect data from two groups — e.g., gene expression levels in tumor tissue (n = 6) versus normal tissue (n = 5). 2. Compute the observed test statistic, typically the difference in group means (or medians): Tobs=xˉtumor−xˉnormalT_{\text{obs}} = \bar{x}_{\text{tumor}} - \bar{x}_{\text{normal}}. 3. Pool all 11 observations together, erasing the group labels. 4. Randomly reassign 6 of the 11 values to a "pseudo-tumor" group and the remaining 5 to "pseudo-normal," respecting the original group sizes. 5. Recompute the difference in means on this relabeled data: one permutation replicate, T1∗T^{*}_1. 6. Repeat for all possible relabelings (for small n this can be exhaustive — (116)=462\binom{11}{6} = 462 ways) or for a large random subset of relabelings (typically 10,000+) when the full set is too large to enumerate. 7. The resulting collection of T∗T^{*} values is the empirical null distribution — what differences in means would look like if group membership were irrelevant. 8. The p-value is the proportion of permuted statistics as extreme as, or more extreme than, the observed one:

p=#{ ∣Ti∗∣≥∣Tobs∣ }+1B+1p = \frac{\#\{\,|T^{*}_i| \ge |T_{\text{obs}}|\,\} + 1}{B + 1}

(the "+1" corrections account for the observed data itself being one valid permutation, ensuring the p-value is never exactly zero). A crucial distinction: the bootstrap resamples with replacement from a single sample to characterize estimation uncertainty. The permutation test resamples without replacement (reshuffling labels on fixed data) to characterize what "no effect" looks like. Confusing the two — permuting to get a confidence interval, or bootstrapping to get a null p-value — produces incorrect inference, because bootstrapping does not, by itself, enforce a null hypothesis, and permutation does not preserve the marginal structure needed for interval estimation.

Figure
Bootstrap resampling: rebuilding a sampling distribution from one sample
Bootstrap: resample with replacement, B times Original sample (n = 6) 4 7 5 9 3 6 Resample 1 (draw 6, with replacement) 7 7 3 9 4 4 → median* = 5.5 Resample 2 9 5 5 6 3 3 → median* = 5.0 … repeated B = 10,000 times … Bootstrap distribution of median* bootstrap median values 2.5th pct 97.5th pct 95% CI = [2.5th, 97.5th percentile]
Figure
Permutation test: building the null distribution by relabeling
Permutation test: shuffle labels, recompute difference Observed data (true labels) Tumor: 8,9,7 Normal: 3,4,5 Observed difference in means, T_obs = 8.0 − 4.0 = 4.0 pool & reshuffle labels Permutation 1 4,9,5 3,8,7 T* = 6.0−6.0 = 0.0 Permutation 2 3,7,5 4,8,9 T* = 5.0−7.0 = −2.0 … repeated for all 20 relabelings (⁶C₃) or 10,000 random draws … Null distribution of T* T* values (centered at 0) T_obs = 4.0 p = fraction of T* ≥ 4.0 (one-tailed)

The evidence

Bradley Efron and the invention of the bootstrap (1979). Before 1979, statisticians estimating standard errors for complicated statistics — medians, ratios, correlation coefficients — relied on the delta method or jackknife approximations, both of which could be inaccurate for small or skewed samples. Efron's 1979 paper, "Bootstrap Methods: Another Look at the Jackknife," proved that resampling the observed data with replacement, and recomputing the statistic, produces an estimator of the sampling distribution that converges to the truth as sample size grows, under quite general conditions. He demonstrated this first on simulated data where the true answer was known by construction, showing the bootstrap standard error tracked the true theoretical standard error closely — including in cases (like the median) where classical formulas were unreliable or unavailable. Subsequent theoretical work (Efron & Tibshirani, 1993; Peter Hall's asymptotic theory in the 1980s) formalized when the bootstrap works: it requires the original sample to be reasonably representative and, technically, that the statistic be "smooth" enough (some statistics, like the maximum of a sample, are known to behave poorly under the naive bootstrap). The bootstrap was rapidly validated across fields by comparing bootstrap confidence intervals against known-truth simulations and against exact intervals in cases where exact solutions existed, and the two matched closely — the core evidence that a computational shortcut can substitute rigorously for calculus.

Felsenstein and the phylogenetic bootstrap (1985). Joseph Felsenstein's 1985 paper, "Confidence Limits on Phylogenies: An Approach Using the Bootstrap," is one of the most cited applications in all of biology. The problem: given an alignment of DNA or protein sequence characters, a phylogenetic tree-building algorithm produces one estimated tree — but how confident should biologists be in any particular branch (clade)? No classical formula existed, because tree-building is a complex, non-linear, discrete optimization over a huge space of possible trees. Felsenstein's solution: resample the alignment columns (sites) with replacement to create pseudo-replicate alignments of the same length, rebuild the tree for each pseudo-replicate, and record what fraction of the resulting bootstrap trees contain each clade found in the original tree. A clade appearing in, say, 950 of 1,000 bootstrap replicate trees is reported with 95% bootstrap support — the now-ubiquitous number seen on published phylogenies. This did not derive from an assumption of normality; it built the tree-uncertainty distribution empirically from the same sequence data that produced the original tree, and was validated by simulation studies (Hillis & Bull, 1993) showing that bootstrap support values correlate with the actual probability that a clade is correctly reconstructed, though the correspondence is conservative (a 70% bootstrap value often corresponds to genuine support in more than 70% of true replications, an issue explored extensively afterward).

Fisher's exact test and the logic of permutation (1935). Ronald Fisher's book The Design of Experiments (1935) introduced the Lady Tasting Tea experiment as a paradigm case for exact permutation-based reasoning. A woman claimed she could tell, by taste, whether milk or tea was poured into a cup first. Fisher designed a test: present her with 8 cups, 4 prepared each way, in random order, and ask her to identify the 4 milk-first cups. Under the null hypothesis that she has no discriminating ability, the number of correct identifications follows a distribution derivable by exhaustively enumerating all (84)=70\binom{8}{4} = 70 ways the cups could be labeled. If she correctly identifies all 4 milk-first cups, the exact probability of doing so by chance alone is 1/70≈0.0141/70 \approx 0.014 (using the hypergeometric distribution, itself a permutation argument) — a testable, falsifiable prediction under pure chance. This is the direct ancestor of the modern permutation test: instead of assuming a parametric distribution, enumerate (or simulate) all the ways labels could have been assigned under the null, and see how extreme the observed outcome is relative to that reference set. Later, R.A. Fisher and, more explicitly, E.J.G. Pitman (1937) generalized this logic into permutation tests for continuous data, providing exact, assumption-light p-values — validated because, unlike the t-test, the permutation p-value is exact for the specific sample at hand under the null of exchangeability, not merely asymptotically correct.

Worked examples

Example 1 — Bootstrap confidence interval for a skewed ecological trait. An ecologist samples clutch sizes (number of eggs) from 10 nests of an endangered bird species, obtaining the following, deliberately asymmetric data (one very large clutch skews the distribution):

2,3,3,4,4,4,5,5,6,142, 3, 3, 4, 4, 4, 5, 5, 6, 14

The sample mean is xˉ=5.0\bar{x} = 5.0 eggs, but the distribution is strongly right-skewed by the outlier clutch of 14 — a t-based confidence interval assuming normality would be distorted by this skew and could even include biologically impossible negative clutch sizes at the lower bound. Instead, bootstrap the mean: 1. Draw a resample of 10 values, with replacement, from the 10 observations above. One such resample might be: 3,3,4,4,4,5,5,6,6,143, 3, 4, 4, 4, 5, 5, 6, 6, 14 → mean* = 5.4. 2. Repeat this 10,000 times, recording the resample mean each time. 3. Sort the 10,000 bootstrap means and read off the 2.5th and 97.5th percentiles. A representative outcome (values are illustrative of the typical pattern for this dataset):

QuantityValue
Observed sample mean5.0 eggs
Bootstrap SE of the mean≈ 1.05 eggs
95% percentile bootstrap CI(3.4, 7.5) eggs
Naive normal-theory 95% CI(2.3, 7.7) eggs

Notice the bootstrap interval is asymmetric around 5.0 (closer to 3.4 below, further to 7.5 above) — correctly reflecting that the outlier of 14 pulls the upper tail of the sampling distribution out further than the lower tail, something the symmetric normal-theory interval cannot capture and which even permits a biologically implausible near-zero lower bound. This asymmetry, automatically produced by resampling the actual skewed data, is the chief practical advantage of the bootstrap over classical formulas for small, skewed biological samples.

Example 2 — Permutation test for a small-sample genetic association. A researcher studies whether a candidate SNP genotype is associated with resistance to a fungal pathogen in a small greenhouse trial. Because of limited seed stock, sample sizes are small and unequal:

  • Resistant genotype (AA), n = 5 plants: disease severity scores (0–10 scale) = 1, 2, 2, 3, 1
  • Susceptible genotype (aa), n = 8 plants: disease severity scores = 4, 5, 6, 3, 7, 5, 4, 6

Observed group means: xˉAA=1.8\bar{x}_{AA} = 1.8, xˉaa=5.0\bar{x}_{aa} = 5.0, so Tobs=5.0−1.8=3.2T_{\text{obs}} = 5.0 - 1.8 = 3.2. With n = 5 and n = 8 (total 13), a t-test would require assuming approximate normality within each tiny group — risky with only 5 observations in one arm, and disease severity scores are bounded, discrete, and plausibly non-normal. Permutation approach: 1. Pool all 13 severity scores. 2. Randomly assign 5 of the 13 to a "pseudo-AA" group and the remaining 8 to "pseudo-aa," matching the original group sizes. 3. Recompute the difference in means for this relabeling. 4. Repeat for all (135)=1,287\binom{13}{5} = 1{,}287 possible relabelings (small enough to enumerate exactly) or a large random sample of them. 5. Count how many of the 1,287 relabelings produce a difference in means ≥3.2\geq 3.2 (one-tailed, since resistance is hypothesized to reduce severity). Suppose only 6 of the 1,287 possible relabelings produce a difference this large or larger. Then:

p=6+11287+1≈0.0054p = \frac{6+1}{1287+1} \approx 0.0054

This is a valid, exact p-value for this specific sample — it required no assumption about the shape of the severity-score distribution, only that under the null hypothesis of no genotype effect, any of the 1,287 ways of splitting the 13 scores into groups of 5 and 8 were equally likely. This is exactly the situation permutation testing was built for: small, non-normal, unbalanced groups where classical test assumptions are shaky but the logic of random assignment is airtight.

Common misconceptions & traps

MisconceptionCorrection
"Bootstrapping lets you get more information than you actually collected."It only recombines information already present in the sample; it cannot recover data you never measured, nor correct for a biased or unrepresentative sample.
"Permutation tests and bootstrap resampling are interchangeable procedures."Bootstrap resamples with replacement to estimate uncertainty in an estimate; permutation shuffles labels without replacement to build a null distribution for a hypothesis test. Using one for the other's purpose gives wrong answers.
"A 70% phylogenetic bootstrap value means there's a 70% chance the clade is real."Bootstrap support is a measure of internal consistency of the data under resampling, not a direct probability the clade is true; simulation studies show it is often conservative, and interpretations vary by tree-building method.
"More bootstrap replicates always fixes an unrepresentative sample."Increasing B only reduces Monte Carlo (simulation) noise in estimating the bootstrap distribution; it does nothing to fix bias if the original sample itself is a poor representation of the population.
"Permutation p-values are always exact and require no assumptions at all."They require exchangeability under the null — e.g., independent, identically distributed observations, or freely interchangeable labels. Correlated data (repeated measures, spatial or phylogenetic autocorrelation) violate this and require restricted permutation schemes.

The scientist behind it

Bradley Efron, born in 1938, trained as a statistician at Stanford University, where he has spent most of his career. Working alongside biostatisticians and genomicists, Efron had a long-standing interest in problems where classical asymptotic theory gave unsatisfying answers for real, finite samples — exactly the regime biologists face constantly with modest sample sizes of organisms, patients, or specimens. His 1979 bootstrap paper generalized an existing idea (the jackknife, developed by Maurice Quenouille and John Tukey in the 1950s, which drops one observation at a time rather than resampling with replacement) into something far more flexible and broadly applicable. Efron was explicit that the bootstrap was made practical only by the arrival of accessible computing power — the method is fundamentally computational, not a pen-and-paper technique, and its rise tracks the rise of cheap, fast computers through the 1980s and 1990s. Efron later collaborated extensively on applying resampling and empirical Bayes methods to genomics and large-scale hypothesis testing, cementing the bootstrap's place at the center of quantitative biology.

Origins · 1 minBradley Efron and how this was discovered
BE
Bradley Efron
born 1938 · Stanford University, statistics, 1970s–present

History
- 1935 — Ronald Fisher formalizes exact permutation logic with the Lady Tasting Tea design.
- 1937 — E.J.G. Pitman generalizes permutation tests for continuous data.
- 1979 — Bradley Efron introduces the bootstrap in "Bootstrap Methods: Another Look at the Jackknife."
- 1985 — Joseph Felsenstein applies the bootstrap to phylogenetic tree confidence, creating bootstrap support values.
- 1993 — Efron and Tibshirani publish An Introduction to the Bootstrap, standardizing practice across sciences.

Where this matters today

Phylogenetics and molecular evolution. Every published gene tree or species tree today reports bootstrap support values (or the related Bayesian posterior probabilities) on its branches, directly following Felsenstein's 1985 method, guiding decisions about which evolutionary relationships are well-supported by the sequence data versus which remain uncertain.

Genome-wide association studies (GWAS) and multiple testing. Testing millions of genetic markers for association with a trait creates a massive multiple-testing burden. Permutation testing is used to empirically determine genome-wide significance thresholds by repeatedly permuting phenotype labels across the actual genotype data, capturing the correlation structure (linkage disequilibrium) among markers that theoretical Bonferroni corrections handle poorly.

RNA-seq and differential gene expression. With often only 3–6 biological replicates per condition, permutation-based and bootstrap-based methods (and their refinements in tools like SAM — Significance Analysis of Microarrays) are used to assess whether observed expression differences for thousands of genes simultaneously exceed what reshuffled labels would produce by chance, controlling the false discovery rate.

Conservation biology and small-population ecology. Endangered species studies routinely have tiny sample sizes (a handful of individuals, nests, or populations); bootstrap confidence intervals for parameters like genetic diversity indices, population growth rate, or trait means are standard because normal-theory approximations are unreliable at n < 20.

Ecological community analysis. Permutation-based multivariate methods (PERMANOVA, Mantel tests) test whether community composition differs between habitats or whether genetic distance correlates with geographic distance, explicitly built around resampling because ecological community data (counts, presence-absence matrices) violate the assumptions of classical multivariate normal theory.

Clinical and epidemiological studies. Small clinical trials, rare-disease cohorts, and case-control studies with modest sample sizes use bootstrap confidence intervals for odds ratios, hazard ratios, and other non-normally-distributed estimators, and permutation tests when treatment assignment is the only random element that can be reshuffled. Both techniques form an essential bridge to more modern computational inference: the same simulation logic — generate many plausible datasets, observe how a quantity behaves across them — underlies Markov chain Monte Carlo (MCMC) sampling in Bayesian Inference in Biology: An Introduction, where instead of resampling data, one samples from a posterior distribution over parameters. Understanding resampling well is the natural stepping stone to understanding Bayesian computation.

Ask the tutor: How do I choose between the percentile bootstrap and the BCa (bias-corrected and accelerated) confidence interval for a skewed biological dataset?

Why can't I just use a t-test for everything instead of bootstrapping or permuting?

The t-test relies on the sampling distribution of the mean being approximately normal, which follows either from the data themselves being normal or, via the Central Limit Theorem, from a sufficiently large sample size. Many biological statistics — medians, ratios, correlation coefficients, phylogenetic tree topologies, odds ratios in small case-control studies — either have no known theoretical sampling distribution, or that distribution is a poor approximation at the modest sample sizes typical of ecological and genetic studies. Resampling methods make far fewer assumptions (representativeness for the bootstrap, exchangeability for permutation) and remain valid even when classical formulas break down, at the cost of requiring computation rather than a table lookup.

How many bootstrap replicates or permutations are "enough"?

For estimating a confidence interval via the percentile method, 1,000–2,000 replicates are usually adequate for the standard error, but the more refined BCa interval and its percentile estimates benefit from 10,000 or more to stabilize the extreme tail percentiles (2.5th and 97.5th). For permutation tests, if the total number of possible relabelings is small (as with tiny sample sizes), it is best to enumerate all of them exactly; otherwise, 10,000 random permutations typically gives a p-value precise enough for practical decision-making, and increasing this number reduces Monte Carlo noise in the p-value itself, not the underlying statistical uncertainty.

Does bootstrapping work for any statistic?

Not universally. The bootstrap is proven to work well (is "consistent") for smooth statistics like means, variances, regression coefficients, and correlation coefficients under fairly general conditions. It performs poorly for some statistics with unusual behavior at the boundary of the parameter space, such as the sample maximum or minimum, and for statistics from very small samples (single digits) where resampling cannot adequately represent the tails of the true population. In those edge cases, specialized bootstrap variants (e.g., the m-out-of-n bootstrap) or entirely different methods are needed.

Can permutation tests handle more than two groups or continuous predictors?

Yes. For more than two groups, a permutation-based ANOVA reshuffles all observations across all groups and recomputes the F-statistic (or a comparable statistic) under each relabeling. For continuous predictors, permutation tests for correlation or regression slopes shuffle the pairing between the predictor and response variable — for example, randomly reassigning which genetic distance value goes with which geographic distance value in a Mantel test — while keeping each variable's own values and order intact.

What happens if my data are not independent, like repeated measurements on the same individual or spatially autocorrelated ecological samples?

Standard permutation and bootstrap procedures assume independence (or at least exchangeability) among the units being resampled; violating this invalidates the resulting p-values or confidence intervals, often making them anti-conservative (too many false positives). Specialized versions exist: the block bootstrap resamples contiguous blocks of correlated observations (common in time series and spatial ecology) rather than single points, and restricted permutation schemes shuffle only within legitimate exchangeable units (e.g., permuting whole subjects' data blocks rather than individual repeated measurements) to respect the dependence structure.

How does the bootstrap relate to Bayesian inference?

Both are computational, simulation-heavy approaches that largely superseded reliance on closed-form formulas, but their logic differs. The bootstrap treats the observed sample as a stand-in for the population and asks what estimates would look like across repeated resampling from that one dataset — it remains a frequentist procedure, interpreting probability as long-run frequency across hypothetical repeated sampling. Bayesian inference instead builds a full posterior probability distribution over parameter values by combining a prior belief with the observed data's likelihood, often approximated via Markov chain Monte Carlo (MCMC) simulation. The two share a computational spirit — heavy simulation replacing closed-form derivation — but rest on different foundations of what probability means, a distinction explored fully when moving on to Bayesian methods.

Is a permutation test p-value ever exactly correct, or is it always an approximation?

When every possible relabeling is enumerated exhaustively (feasible for small sample sizes, as in the Lady Tasting Tea example with 70 possible arrangements), the resulting p-value is exact for that specific dataset under the null hypothesis of exchangeability — there is no approximation error at all. When the number of possible permutations is astronomically large (common with even moderate sample sizes) and only a random subset of, say, 10,000 permutations is used, the p-value carries a small amount of Monte Carlo simulation error, which shrinks as more permutations are drawn but never disappears completely unless every permutation is used.

Before this

Where this leads