Why Resample the Data We Have?
A statistic such as a sample mean or median describes the data collected, but it can change if a different sample is collected. In many settings, the population is too large to measure completely, so we cannot directly see how much a statistic would vary across repeated samples. The bootstrap provides a way to study that variation by treating the observed data as a stand-in for the population.
The central idea is simple: make repeated samples from the data already observed, allowing the same observation to be selected more than once. Each resample has the same size as the original sample. We calculate the statistic of interest for each resample and examine how those results vary. These resamples are not new observations from the real population; they are generated from a model built from the observed data.
The Empirical Distribution as a Stand-In
Suppose the observed values are \(x_1,x_2,\ldots,x_n\). The empirical distribution says that one draw has probability \(1/n\) of selecting each position in this list. A value appearing several times therefore has a greater chance of being selected than a value appearing once. For example, if the data are \(2,2,5,9\), a draw has probability \(2/4\) of being 2, and probability \(1/4\) each of being 5 or 9.
“Draw with replacement” means that after selecting a value, we put it back before the next draw. Thus each draw has the same empirical distribution, and the same observed position can be selected repeatedly. A bootstrap sample can contain duplicates and can omit some original observations. It cannot contain a value that was absent from the original data.
The empirical distribution is also a compact way to describe the observed data as a probability model. For a threshold \(x\), its cumulative probability is the fraction of observed values at most \(x\):
where \(I(x_i\leq x)\) equals 1 when \(x_i\leq x\) and 0 otherwise. This formula simply counts the observations at or below \(x\), then divides by \(n\).
Worked Example: Reading an Empirical Distribution
Suppose a hypothetical sample of four daily measurements, in units, is \(2,2,5,9\). Find the empirical probabilities of the observed values and the empirical probability that a draw is at most 5.
There are four observed positions, each with probability \(1/4\). The value 2 occupies two positions, so its probability is \(2/4=0.50\). The values 5 and 9 each occupy one position, so each has probability \(1/4=0.25\).
The values at most 5 are \(2,2,5\), or three of the four observations. Therefore the empirical probability of a draw at most 5 is \(3/4=0.75\). This is a probability under the empirical distribution, not a claim that exactly 75% of all future population measurements must be at most 5.
The empirical mean is \((2+2+5+9)/4=18/4=4.5\) units. A bootstrap sample drawn from this distribution will tend to use the values 2, 5, and 9 in proportions similar to their empirical probabilities, but random resampling can produce a different mean.
How a Bootstrap Replicate Is Generated
For an ordinary bootstrap, take \(n\) draws from the empirical distribution, independently and with replacement. This gives a resample of size \(n\), even though some original observations may appear multiple times. Apply the statistic of interest to that resample in exactly the same way as to the original data.
They define the empirical distribution. For an ordinary bootstrap of independent observations, each observed position receives probability \(1/n\).
Each draw selects one of the observed positions, and a selected position remains available for later draws.
Use the same formula as for the original data, but with the bootstrap sample in place of the original sample.
Each repeated resample produces another replicate of the statistic. The collection of replicates shows how the statistic varies under the empirical model.
For a sample of size \(n\), there are \(n^n\) possible ordered bootstrap samples: each of the \(n\) draws has \(n\) possible observed positions. Every particular ordered sequence has probability \((1/n)^n\) under the empirical model. In practice, it is usually more convenient to generate many random resamples than to list all possible sequences.
Worked Example: One Bootstrap Replicate of a Mean
A hypothetical sample of three measurements, in hours, is \(2,4,7\). Construct two possible bootstrap samples and calculate their means.
Each draw selects 2, 4, or 7, each with probability \(1/3\). A possible three-draw resample is \(2,4,4\). Its mean is
Another possible resample is \(7,7,2\). Its mean is
The asterisk marks a statistic calculated from a bootstrap sample. In both resamples, a value appears more than once; that is allowed because sampling is with replacement. Each particular ordered resample, such as \(2,4,4\), has probability \((1/3)^3=1/27\). The two calculated means illustrate that a statistic can vary across bootstrap samples, even though every resample comes from the same three observed values.
Why the Empirical Distribution Can Approximate Uncertainty
The population distribution is unknown, which is why the original sample was collected. If the observations provide a reasonable representation of that population, their empirical distribution can serve as an approximation to it. The bootstrap then repeats the sampling mechanism using this estimated distribution in place of the unknown population distribution.
One short justification comes from looking at the empirical probability below a fixed value \(x\). If the original observations are independent draws from a population with cumulative distribution function \(F(x)\), then each indicator \(I(X_i\leq x)\) has expectation \(F(x)\). By linearity of expectation,
So the empirical fraction at or below \(x\) is, across repeated original samples, centered on the corresponding population probability. The bootstrap uses this empirical distribution as a practical estimate of the population distribution. Repeating draws from it provides a way to approximate how a statistic would vary if sampling were repeated under that estimated model. This argument explains the idea; it does not guarantee that the approximation is accurate for every statistic, data set, or sampling design.
The key assumptions for the ordinary procedure are that the original observations are reasonably representative of the population relevant to the question and that they can be treated as independent, identically distributed observations. The resampling must also preserve the observational unit and the structure relevant to the statistic. A biased convenience sample does not become representative merely because it is resampled many times. Likewise, if observations are naturally paired, clustered, or selected using a complex design, drawing individual rows independently may fail to preserve important structure.
Worked Example: Bootstrap Replicates of a Median
Consider a hypothetical sample of five measurement values: \(1,3,3,8,10\). Its median is the middle value after sorting, which is 3. Compare the medians of two possible bootstrap samples of size five.
The resample \(1,3,3,3,10\) is possible because each value was drawn from the observed list with replacement. It is already sorted, so its middle value—and therefore its median—is 3.
The resample \(1,1,8,10,10\) is also possible. Its middle value is 8, so its median is 8. Both replicates are calculated using the same definition of the median as for the original sample.
These two results show that the empirical model allows some variation in the median. They do not show that a real population median is 3 or 8, nor do two replicates by themselves provide a reliable summary of uncertainty. They illustrate how repeated resampling creates possible values of a statistic for further analysis.
What the Bootstrap Does—and Does Not—Tell Us
A collection of bootstrap replicates is a model-based approximation to the statistic’s repeated-sampling behavior. It reflects the observed values and their relative frequencies. If the original sample is small, unusual features of the population may not appear in the data, and the bootstrap cannot recreate them. If an extreme value is observed only once, for example, it has empirical probability \(1/n\) on each draw; if an important population value is never observed, it has probability zero under the empirical distribution.
The number of resamples and the quality of the original sample answer different questions. Generating more resamples can make a computer’s description of the empirical model more stable, but it does not add new information about the real population. A very large number of bootstrap replicates from a poor or unrepresentative sample can still provide a poor approximation to population uncertainty.
The basic idea is useful because it applies to many statistics: means, medians, and other quantities calculated from data. The specific ways to summarize bootstrap replicates and construct inferential results require additional methods. Here, the essential distinction is between the original sample, the empirical distribution defined by that sample, and the bootstrap samples drawn from that distribution.
Common Mistake
- Wrong reasoning: “A bootstrap sample is a new independent sample from the population, so repeated resampling gives us more real data.”
- Correction: A bootstrap sample is drawn from the empirical distribution of the original observations, not from the population itself. It can help approximate variation under that empirical model, but it does not add observations or repair a sample that poorly represents the population.
A second common error is to sample without replacement. That produces a rearrangement or subset of the observed data, not the ordinary bootstrap described here. Replacement is what allows some observations to recur while others are omitted, creating variation among resamples.
Check Your Understanding
Answer each question using the definitions and examples above.
- For the data \(4,4,6,10\), what empirical probability is assigned to the value 4? What is the empirical probability of a draw at most 6?
- Why can a bootstrap sample contain the same observed value more than once, and why can it not contain a value absent from the original data?
- A sample has size 6. How many draws are made to construct one ordinary bootstrap sample, and how many possible ordered bootstrap samples are there?
- For the observed values \(2,5,8\), is \(5,5,2\) a possible bootstrap sample? Explain how its mean would be calculated.
- Why does generating many bootstrap resamples not correct bias or make an unrepresentative original sample representative?