Why Bootstrap a Proportion?
Many questions concern the fraction of a population with a particular characteristic: the proportion of patients who improve, of parts that fail inspection, or of households that use a service. A sample gives an estimate of that proportion, but a different sample would usually give a different estimate. A bootstrap interval uses resampling from the observed data to represent some of that sampling variability.
For a binary outcome, each observation is either a success or a failure, where “success” means the outcome of interest and does not necessarily mean a desirable result. The population proportion is the probability of success in the population or sampling process. The sample proportion is the observed fraction of successes.
The method assumes the observed units can reasonably be treated as independent, representative observations from the target population or sampling process. The bootstrap does not correct a biased sample, account automatically for dependence, or turn a convenience sample into a random one. These design and data-quality questions matter before resampling begins.
How a Percentile Bootstrap Interval Is Formed
In each bootstrap resample, calculate the resampled proportion \(\hat{p}^{*}\). Repeating this many times produces a bootstrap distribution of proportions, which approximates the variation in the statistic under repeated sampling from the empirical distribution of the observed data. A percentile interval uses the lower and upper quantiles of that distribution.
A quantile convention is needed because the bootstrap distribution for a proportion is discrete. Here, a quantile at probability \(q\) is the smallest value whose cumulative probability is at least \(q\). With a finite number \(B\) of simulated resamples, software estimates these quantiles from the simulated values; results can vary slightly with the resampling run. When convenient, the exact conditional bootstrap distribution can instead be calculated.
Conditional on the observed data, each bootstrap draw is a success with probability \(\hat{p}\), because the resampling pool contains a fraction \(\hat{p}\) successes. The \(n\) draws are independent, since each is made with replacement. Thus the number of bootstrap successes \(K^{*}\) has a binomial distribution, and the resampled proportion is \(K^{*}/n\).
This result gives a direct way to understand the bootstrap distribution for binary data. It also makes clear that its possible values are only \(0,1/n,2/n,\ldots,1\). The bootstrap is resampling the outcomes actually observed; it is not generating new kinds of observations absent from the sample.
Worked Example: A Percentile Interval from Ten Observations
Suppose, hypothetically, that a quality team records whether each of 10 independently selected test units has a specified defect. Three units have the defect, so \(x=3\), \(n=10\), and the observed defect proportion is:
In bootstrap resamples, the probability of recording a defect on any draw is 0.30. Therefore \(K^{*}\sim\operatorname{Binomial}(10,0.30)\). For example, the probability of zero bootstrap defects is \(P(K^{*}=0)=(0.70)^{10}=0.0282475\), and the probability of one is \(P(K^{*}=1)=10(0.30)(0.70)^9=0.121061\).
Using the exact binomial probabilities, the cumulative probabilities at the relevant counts are \(P(K^{*}\leq 0)=0.0282475\), \(P(K^{*}\leq 5)=0.952651\), and \(P(K^{*}\leq 6)=0.989408\). The 0.025 quantile is zero, since the cumulative probability first reaches 0.025 at \(K^{*}=0\). The 0.975 quantile is six, because the cumulative probability through five is below 0.975 and the cumulative probability through six is above it.
Converting the endpoints from counts to proportions gives the 95% percentile bootstrap interval:
In context, this bootstrap procedure gives an interval from 0% to 60% for the population defect proportion. The interval is wide and includes values below and above the observed 30%. It is not a statement that there is a 95% probability that this fixed population proportion lies in these particular endpoints.
What the Interval Does—and Does Not—Say
A confidence interval is a procedure for estimating an unknown parameter. In repeated use under the relevant sampling assumptions, a 95% confidence procedure is designed to cover the fixed parameter about 95% of the time. A bootstrap percentile interval approximates such a procedure using the empirical distribution, but its actual coverage can differ from 95%, especially with small samples or discrete, highly skewed bootstrap distributions.
The interval's endpoints are constrained by the resampling data and by the sample size. For instance, with \(n=10\), bootstrap proportions change in steps of 0.1. With few observations, the discreteness can make the interval jump noticeably as the sample changes. A reported percentile interval should therefore be interpreted as an estimate of uncertainty, not as a guarantee that the true proportion falls between its endpoints.
Other bootstrap constructions, such as basic, studentized, and BCa intervals, use the bootstrap distribution differently. The binary-data structure still applies: ordinary resampling cannot produce a success if none was observed, or a failure if none was observed. A more elaborate interval formula cannot recover information that the resampling pool does not contain.
Worked Example: A Near-Boundary Sample
Suppose, hypothetically, that one of 10 independently sampled seedlings is found to have a specified condition. Then \(x=1\), \(n=10\), and \(\hat{p}=0.10\). Under ordinary bootstrap resampling, \(K^{*}\sim\operatorname{Binomial}(10,0.10)\).
The probability of no cases in a resample is \(P(K^{*}=0)=(0.90)^{10}=0.348678\). The cumulative probabilities needed for the 95% percentile endpoints are \(P(K^{*}\leq 0)=0.348678\), \(P(K^{*}\leq 2)=0.929809\), and \(P(K^{*}\leq 3)=0.987205\). Thus the 0.025 quantile is 0, while the 0.975 quantile is 3: the cumulative probability through two is below 0.975, and the cumulative probability through three is above it.
The percentile interval is therefore:
The interval includes zero even though one case was observed. This is possible because many bootstrap resamples contain no cases. In context, the interval is from 0% to 30% for the population proportion under the percentile bootstrap procedure. The result also illustrates the coarse steps and substantial discreteness that can occur with a small sample.
Boundary Data: When Every Resample Is Identical
A boundary problem occurs when the observed sample proportion is zero or one. If \(x=0\), every observed outcome is a failure. Resampling those outcomes with replacement still gives only failures. If \(x=n\), every observed outcome is a success, so every resample still consists only of successes. The bootstrap distribution then has no variation at all.
Consequently, the ordinary percentile interval is \([0,0]\) when no successes are observed and \([1,1]\) when all observations are successes. Basic or BCa procedures based on the same degenerate bootstrap information can also encounter serious problems. These zero-width intervals should not be taken as evidence that the population proportion is known with certainty. They reflect the limitation of resampling an empirical distribution that contains only one outcome category.
Worked Example: No Successes in the Sample
Suppose, hypothetically, that a researcher checks 12 independently selected devices for a particular failure and observes no failures. The estimated failure proportion is:
Each bootstrap resample draws 12 times from a pool containing 12 nonfailures. Therefore, for every resample, \(K^{*}=0\) and \(\hat{p}^{*}=0/12=0\). Both the 0.025 and 0.975 quantiles are zero, so the ordinary percentile bootstrap interval is \([0,0]\).
This output does not establish that the population failure proportion is zero. It says only that the empirical bootstrap distribution, formed from this all-nonfailure sample, contains no variation. A different method designed for a binomial proportion, such as a Wilson score or exact binomial interval, can represent uncertainty in this situation. The method should be chosen and reported explicitly; an ordinary bootstrap interval should not be presented as informative when its bootstrap distribution is degenerate.
A Short Justification of the Bootstrap Distribution
The binomial form follows directly from the resampling rule. Label each draw as a success indicator, equal to 1 for a success and 0 for a failure. Given the observed data, a draw selects one of the \(n\) observed units uniformly. Exactly \(x\) of those units are successes, so the conditional probability that the draw is a success is \(x/n=\hat{p}\). Since draws are independent under sampling with replacement, the total number of successes across \(n\) draws is the sum of \(n\) independent success indicators with common success probability \(\hat{p}\). By the definition of the binomial distribution, that total has distribution \(\operatorname{Binomial}(n,\hat{p})\). Dividing the total by \(n\) gives the bootstrap proportion.
This justification also explains the boundary failure. If \(\hat{p}=0\), each indicator is zero with probability one, so their sum is zero with probability one. If \(\hat{p}=1\), each indicator is one with probability one, so their sum is \(n\) with probability one. No amount of repeating the same ordinary resampling scheme changes those facts.
Practical Checks and Common Mistakes
Before reporting a bootstrap interval for a proportion, state what counts as a success, identify the number of observations and successes, and check the sample design. Then confirm that bootstrap resampling reproduces the original sampling units and dependence structure. For a simple independent binary sample, resampling individual outcomes is appropriate; for clustered or paired data, the resampling unit must reflect that design.
Specify which binary category is counted as a success and identify the population proportion \(p\) of interest.
Record \(x\), \(n\), and \(\hat{p}=x/n\), with the relevant context and units (usually a proportion or percentage).
If \(\hat{p}=0\) or \(\hat{p}=1\), ordinary bootstrap resamples are identical in outcome composition and the resulting interval is degenerate.
For an interior sample proportion, obtain the chosen bootstrap quantiles and explain the interval in context, including the limitations of discreteness and the sampling assumptions.
Common mistake: “Every bootstrap resample had zero successes, so there is no uncertainty and the population proportion must be zero.” The first part describes the resampling output; the conclusion does not follow. Every resample had zero successes because the original empirical pool had none. The population can still have a positive success probability, and a method designed to express uncertainty for boundary samples is needed.
A second mistake is to treat a bootstrap interval as a probability statement about the fixed parameter. Instead, describe the interval as the result of a procedure intended to have a specified long-run coverage under its assumptions. For bootstrap intervals, also acknowledge that the procedure is an approximation and can behave poorly when data are sparse or at a boundary.
Check Your Understanding
Try these questions before moving on.
- A sample has 6 successes among 20 observations. What is \(\hat{p}\), and what is the conditional distribution of the bootstrap success count?
- Why does resampling with replacement from binary data produce a binomial bootstrap count?
- In a percentile bootstrap interval, which quantiles are used for a 90% interval?
- A sample contains no successes. Explain why an ordinary percentile bootstrap interval has zero width and why that does not establish that the population proportion is zero.
- State an appropriate contextual interpretation of a 95% bootstrap interval for a population proportion, avoiding a probability claim about the fixed parameter.