Why Resample Pairs?
In heteroskedastic regression, the variability of the outcome around its conditional mean can change with the predictors. A resampling method should reflect that the observed predictor values and outcomes occur together: an outcome should not be reassigned to an unrelated predictor just to generate a new sample. The pairs bootstrap does this by resampling whole predictor–outcome observations.
This method is especially natural when observations are independent draws from a population and the predictors are random. It generates new samples from an approximation to the joint distribution of predictors and outcomes, then refits the regression in each sample. The resulting coefficient distribution describes how the estimator varies under repeated sampling from that empirical approximation. It is not a guarantee of accurate inference: the sampling design, model target, sample size, and stability of the design still matter.
Algorithm and Regression Target
For a regression with an intercept and \(k\) predictors, let \(x_i\) denote the predictor vector for observation \(i\), including the intercept column, and let \(y_i\) be its outcome. Write the ordinary least-squares estimate as \(\hat{\beta}\). For bootstrap replication \(b\), draw \(n\) indices independently and uniformly from \(\{1,\ldots,n\}\). Refit the regression to the pairs selected by those indices, producing \(\hat{\beta}^{*(b)}\).
Record \(\hat{\beta}\), fitted values, residuals, and the heteroskedasticity-robust standard errors used for the original sample.
Draw \(n\) observations with replacement. A pair selected more than once appears repeatedly; a pair not selected is absent from that replication.
Calculate \(\hat{\beta}^{*(b)}\). Also calculate the chosen heteroskedasticity-robust covariance estimate in that resample and record its standard errors.
Use the empirical distributions of the replicate coefficients and standard errors to quantify uncertainty, for example by a bootstrap standard error or percentile interval.
The target need not be a literally correct conditional-mean equation. If the linear conditional mean is misspecified, ordinary least squares can target the best linear projection under the population distribution of the predictors. Pairs resampling then approximates repeated sampling of both predictors and outcomes, and thus the variability of that projection estimator, provided the observations are independent and the required moments and design conditions hold. It does not turn a misspecified linear description into the true conditional mean.
What the Bootstrap Distributions Mean
For \(B\) replications, the collection \(\hat{\beta}^{*(1)},\ldots,\hat{\beta}^{*(B)}\) is the bootstrap distribution of the coefficient estimator. For a single coefficient, its bootstrap standard error is the sample standard deviation of its \(B\) replicate values:
This is an estimate of the sampling standard deviation of the coefficient estimator. It is distinct from the standard error reported within one regression fit. In particular, if each replicate uses HC0, the replicate HC0 standard errors form their own distribution. The average of those reported standard errors is not, by definition, the bootstrap standard error; the latter is calculated from the variation among the replicate coefficients.
For a regression with an intercept, the HC0 covariance estimate in a bootstrap sample has the sandwich form
where \(X^*\) is the resampled design matrix and \(\hat{u}_i^*\) are residuals from the refitted regression. The square root of the relevant diagonal entry is the HC0 standard error for that coefficient in that replication. Other robust covariance choices can be used, but the choice should be stated and applied consistently.
Worked Examples
Worked Example: One Resampled Regression
Suppose a hypothetical dataset contains four observations: \(A=(0,1)\), \(B=(1,2)\), \(C=(2,2)\), and \(D=(3,5)\), where the first entry is a predictor measured in hours and the second is an outcome measured in units. One bootstrap draw selects \(A,B,D,D\). The duplicate \(D\) is retained twice because sampling is with replacement.
The resampled predictor mean is \(\bar{x}^*=1.75\), and the outcome mean is \(\bar{y}^*=3.25\). The centered sums are \(S_{xx}^*=6.75\) and \(S_{xy}^*=9.25\). Therefore the refitted slope and intercept are
The replicate slope is about \(1.370\) outcome units per hour, and the intercept is about \(0.852\) outcome units. The calculation uses the unrounded slope in the intercept formula. This is one draw, not a reliable estimate of uncertainty by itself.
Worked Example: Computing a Robust Standard Error Within a Replicate
Use the same hypothetical sample and the same resample \(A,B,D,D\). For a simple regression with an intercept, the HC0 variance of the slope is
The fitted line has intercept \(0.85185\ldots\) and slope \(1.37037\ldots\). Its residuals, in the order \(A,B,D,D\), are \(4/27,-6/27,1/27,1/27\). The centered predictor values are \(-1.75,-0.75,1.25,1.25\), and their squared sum is \(6.75\). Substitution gives
Thus this replicate has an HC0 slope standard error of about \(0.0467\) outcome units per hour. The small value is a feature of this particular tiny resample, not evidence that the procedure generally produces small uncertainty. Repeating the calculation across many resamples creates the distribution of within-replicate robust standard errors.
Worked Example: Bootstrap Standard Error and Percentile Interval
Suppose a hypothetical analysis uses \(B=1{,}000\) pairs-bootstrap replications for the slope relating weekly study hours to a test score measured in points. The observed slope is \(1.10\) points per hour. Suppose the sample standard deviation of the 1,000 replicate slopes is \(0.38\) points per hour, and the 25th and 975th ordered replicate values are \(0.42\) and \(1.96\), respectively.
The estimated bootstrap standard error is the replicate standard deviation, \(0.38\) points per hour. The 95% percentile interval uses the 2.5th and 97.5th percentiles:
Under the assumptions supporting the pairs bootstrap, the interval is a bootstrap-based approximation to a 95% confidence procedure for the population regression slope. Its endpoints are not a statement that there is a 95% probability the fixed slope lies in this particular interval. The interval is also not automatically reliable merely because it uses 1,000 replications; its quality depends on the data and the approximation.
Why Resampling Complete Pairs Preserves the Relationship
The empirical distribution of the observed pairs assigns probability \(1/n\) to each observed \((x_i,y_i)\). A pairs-bootstrap sample draws from this joint empirical distribution. Consequently, each selected outcome remains attached to its observed predictor value, and repeated copies preserve that same pairing. If the residual spread differs across predictor values in the observed data, resampling pairs carries those different predictor–outcome combinations into the bootstrap samples.
This is what it means to preserve the observed design relationship: the method samples from the observed joint distribution rather than separately rearranging predictors and outcomes. It does not hold the exact set of predictor values fixed in every replication. Predictor values can appear multiple times or not at all, so pairs resampling reflects random-design variation as well as outcome variation.
If the predictors are fixed by design and the inferential target conditions on those exact values, resampling whole pairs changes the design and may not match the intended sampling scheme. Further, independently sampled pairs are essential: resampling individual observations as if independent is not justified when observations have dependence such as clustering or serial correlation. The method also requires enough variation in the resampled predictors to estimate the regression. A bootstrap draw with a rank-deficient design has no ordinary least-squares coefficient for all regressors; frequent such failures indicate that the design or sample size is too fragile for routine pairs-bootstrap inference.
Common Pitfalls and Practical Checks
- Breaking the pairing. Resampling predictors and outcomes separately destroys their observed joint relationship. Draw complete observations instead.
- Confusing the two standard errors. The standard deviation of replicate coefficients estimates bootstrap sampling variability. A robust standard error computed within each replicate is a different quantity; record it as a separate distribution.
- Assuming pairs resampling fixes every problem. It does not correct dependence, a poor sampling design, severe lack of predictor support, or an unsuitable regression target.
- Reporting only the number of replications. State how pairs were sampled, which coefficient or standard error was summarized, the covariance estimator used within replicates, and how an interval was formed.
- Ignoring instability. With small samples, a few observations can dominate the fit, and some resamples can have very different designs. Inspect the replicate distribution and any rank-deficient samples rather than treating the output as automatically trustworthy.
Check Your Understanding
Answer each question using the definitions and conditions in this tutorial.
- In a pairs-bootstrap sample, what is resampled, and why is it important not to draw predictors and outcomes separately?
- Explain the difference between the bootstrap standard error of a coefficient and the HC0 standard error calculated within one bootstrap replication.
- Does pairs resampling keep the observed predictor values fixed in every replication? Explain what it preserves instead.
- A regression has a rank-deficient design in some bootstrap draws. What does that mean for the coefficient estimates, and what should the analyst examine?
- Why might a pairs bootstrap be unsuitable when observations are dependent or predictors are fixed by design?