| Standard error of the slope | Value |
|---|---|
lm, constant error variance assumed |
0.102 |
| Jackknife | 0.088 |
| HC3 | 0.091 |
STAT 536 — Statistical Computing
Fall 2026
The bootstrap resamples with replacement and uses Monte Carlo. The jackknife leaves out one observation at a time, deterministically. It estimates bias and variance, it measures the influence of each observation, and those influence values are what BCa needs for its acceleration.
Historical Context (Quenouille, 1949; Tukey, 1958). Originally developed for bias reduction, later extended to variance estimation.
Advantages over the bootstrap. Deterministic (same result every time), computationally simpler, and theoretical analysis is often easier.
Notation.
Jackknife bias estimate.
\[\widehat{\text{Bias}}_{jack} = (n-1)(\hat{\theta}_{(\cdot)} - \hat{\theta})\]
Bias-corrected estimate.
\[\tilde{\theta}_{jack} = \hat{\theta} - \widehat{\text{Bias}}_{jack} = n\hat{\theta} - (n-1)\hat{\theta}_{(\cdot)}\]
Consider \(\hat{\theta} = \bar{X}^2\) estimating \(\theta = \mu^2\). Since \(\E[\bar{X}^2] = \mu^2 + \sigma^2/n\), the bias is \(\sigma^2/n\).
Each leave-one-out mean satisfies \(\bar{X}_{(-i)} = \bar{X} - \frac{X_i - \bar{X}}{n - 1}\), so \(\bar{X}_{(-i)}^2 = \bar{X}^2 - \frac{2\bar{X}(X_i - \bar{X})}{n-1} + \frac{(X_i - \bar{X})^2}{(n-1)^2}\). Averaging over \(i = 1, \ldots, n\): the middle term vanishes because \(\sum_i (X_i - \bar{X}) = 0\), and the last term averages to \(S^2/(n(n-1))\) where \(S^2 = \frac{1}{n-1}\sum_i (X_i - \bar{X})^2\), so
\[\hat{\theta}_{(\cdot)} = \frac{1}{n}\sum_{i=1}^n \bar{X}_{(-i)}^2 = \bar{X}^2 + \frac{S^2}{n(n-1)}.\]
Thus \(\widehat{\text{Bias}}_{jack} = (n-1)\bigl(\hat\theta_{(\cdot)} - \hat\theta\bigr) = S^2/n\), and the corrected estimate \(\bar{X}^2 - S^2/n\) is exactly unbiased for \(\mu^2\).
where \(\mu = \E_F X_1\); \(\sigma^2 = \Var_F X_1\); \(\bar X_{(-i)}\): the sample mean without \(X_i\).
Pseudo-values. \(\tilde{\theta}_i = n\hat{\theta} - (n-1)\hat{\theta}_{(-i)}\). These can be treated as approximately independent observations; their mean \(\bar{\tilde\theta}\) is the bias-corrected estimate \(\tilde\theta_{jack}\).
Direct formula.
\[\widehat{\Var}_{jack}(\hat{\theta}) = \frac{n-1}{n} \sum_{i=1}^n (\hat{\theta}_{(-i)} - \hat{\theta}_{(\cdot)})^2\]
Via pseudo-values.
\[\widehat{\Var}_{jack}(\hat{\theta}) = \frac{1}{n(n-1)} \sum_{i=1}^n (\tilde{\theta}_i - \bar{\tilde{\theta}})^2\]
where \(\hat\theta_{(-i)}\): the estimate without \(X_i\); \(\hat\theta_{(\cdot)}\): the mean of the \(\hat\theta_{(-i)}\).
These two forms are equivalent: expanding \(\tilde\theta_i - \bar{\tilde\theta} = -(n-1)(\hat\theta_{(-i)} - \hat\theta_{(\cdot)})\) and squaring gives \((n-1)^2\) times \((\hat\theta_{(-i)} - \hat\theta_{(\cdot)})^2\), and the prefactors match.
Theorem. If \(\E[\hat{\theta}] = \theta + a/n + b/n^2 + O(n^{-3})\) and \(\Var(\hat{\theta}) = \sigma^2/n + O(n^{-2})\), then the jackknife removes the \(O(n^{-1})\) bias term, and \(\E[\widehat{\Var}_{jack}(\hat{\theta})] = \Var(\hat{\theta}) + O(n^{-2})\).
where \(a\), \(b\), \(\sigma^2\): constants that do not depend on \(n\).
Essentially, the jackknife variance works whenever the statistic is smooth enough for a Taylor expansion in \(1/n\).
Empirical influence function. The change in \(\hat\theta\) when \(X_i\) is removed, scaled by \(n - 1\):
\[\widehat{\text{IF}}_i = (n-1)(\hat{\theta} - \hat{\theta}_{(-i)})\]
where \(\hat\theta_{(-i)}\): the estimate without \(X_i\). It is positive when \(X_i\) pulls the estimate up.
The pseudo-value is \(\tilde\theta_i = \hat\theta + \widehat{\text{IF}}_i\).
Connection to jackknife variance. \(\widehat{\Var}_{jack}(\hat{\theta}) = \frac{1}{n(n-1)} \sum_{i=1}^n (\widehat{\text{IF}}_i - \overline{\text{IF}})^2\), where \(\overline{\text{IF}} = -\widehat{\text{Bias}}_{jack}\). When the influence values sum to zero (linear statistics), this simplifies to \(\frac{1}{n(n-1)} \sum_i \widehat{\text{IF}}_i^2\).
The law-school data: \(n = 15\) schools, \(\hat\theta = 0.776\). School 1 has the largest influence value, \(\widehat{\text{IF}} = -1.63\). Deleting it moves the correlation to \(0.893\). Jackknife SE: \(0.143\), jackknife bias: \(-0.0065\).
In a linear model \(y_i = \mathbf{x}_i^\top\boldsymbol\beta + \varepsilon_i\) with least-squares estimate \(\hat{\boldsymbol\beta}\), one fit gives all \(n\) leave-one-out fits:
\[\hat{\boldsymbol\beta}_{(-i)} = \hat{\boldsymbol\beta} - \frac{(\mathbf{X}^\top\mathbf{X})^{-1}\mathbf{x}_i\, e_i}{1 - h_{ii}}, \qquad y_i - \mathbf{x}_i^\top\hat{\boldsymbol\beta}_{(-i)} = \frac{e_i}{1 - h_{ii}}\]
where \(\mathbf{X}\): the \(n \times p\) design matrix, rows \(\mathbf{x}_i^\top\); \(\hat{\boldsymbol\beta}_{(-i)}\): the estimate without observation \(i\); \(e_i = y_i - \mathbf{x}_i^\top\hat{\boldsymbol\beta}\): the residual; \(h_{ii} = \mathbf{x}_i^\top(\mathbf{X}^\top\mathbf{X})^{-1}\mathbf{x}_i\): the leverage.
Essentially, an observation moves the fit when its residual is large and its leverage is high.
| Jackknife quantity | Name in applied regression | In R |
|---|---|---|
| \(\hat{\boldsymbol\beta} - \hat{\boldsymbol\beta}_{(-i)}\) | DFBETA | dfbeta(fit) |
| \(h_{ii}\) | leverage | hatvalues(fit) |
| \(e_i / (1 - h_{ii})\) | deleted (PRESS) residual | resid(fit) / (1 - hatvalues(fit)) |
| \(\lVert\hat{\mathbf{y}} - \hat{\mathbf{y}}_{(-i)}\rVert^2 / (p\,\hat\sigma^2)\) | Cook’s distance | cooks.distance(fit) |
| \(\sum_{i=1}^n (\hat{\boldsymbol\beta} - \hat{\boldsymbol\beta}_{(-i)})(\hat{\boldsymbol\beta} - \hat{\boldsymbol\beta}_{(-i)})^\top\) | HC3 robust variance | sandwich::vcovHC(fit, type = "HC3") |
where \(\hat{\mathbf{y}}_{(-i)} = \mathbf{X}\hat{\boldsymbol\beta}_{(-i)}\); \(\hat\sigma^2\): the residual variance estimate; \(p\): the number of coefficients.
The empirical influence value of observation \(i\) is \((n-1)\) times its DFBETA. The jackknife variance is HC3 with the leave-one-out estimates centered at their mean, times \((n-1)/n\).
GPA regressed on LSAT for the \(n = 15\) schools. The slope is \(0.452\) GPA points per 100 LSAT points.
| Standard error of the slope | Value |
|---|---|
lm, constant error variance assumed |
0.102 |
| Jackknife | 0.088 |
| HC3 | 0.091 |
School 1 has the largest Cook’s distance, \(0.36\): residual \(0.41\), leverage \(0.09\). Without it the slope is \(0.497\).
School 11 moves the slope most: residual \(-0.21\), leverage \(0.18\). Without it the slope is \(0.508\).
where \(X_{(k)}\): the \(k\)th smallest observation.
\[\hat{z}_0 = \Phi^{-1}\!\left(\frac{\#\{\hat\theta^{*(b)} < \hat\theta\}}{B}\right)\]
where \(\Phi^{-1}\): the standard normal quantile function; \(\hat\theta^{*(b)}\): the estimate on resample \(b\), \(b = 1, \ldots, B\).
\[\hat{a} = \frac{\sum_{i=1}^n (\hat{\theta}_{(\cdot)} - \hat{\theta}_{(-i)})^3}{6\left[\sum_{i=1}^n (\hat{\theta}_{(\cdot)} - \hat{\theta}_{(-i)})^2\right]^{3/2}}\]
where \(\hat\theta_{(-i)}\): the estimate without \(X_i\); \(\hat\theta_{(\cdot)}\): the mean of the \(n\) leave-one-out estimates; \(\widehat{\text{IF}}_i = (n-1)(\hat\theta - \hat\theta_{(-i)})\).
Adjusted percentiles. For a \(1-\alpha\) interval, define
\[\alpha_1 = \Phi\!\left(\hat{z}_0 + \frac{\hat{z}_0 + z_{\alpha/2}}{1 - \hat{a}(\hat{z}_0 + z_{\alpha/2})}\right), \qquad \alpha_2 = \Phi\!\left(\hat{z}_0 + \frac{\hat{z}_0 + z_{1-\alpha/2}}{1 - \hat{a}(\hat{z}_0 + z_{1-\alpha/2})}\right)\]
where \(\Phi\) is the standard normal CDF and \(z_\alpha = \Phi^{-1}(\alpha)\).
The interval.
\[\text{CI}_{\text{BCa}} = \left[\hat\theta^*_{(\alpha_1)},\; \hat\theta^*_{(\alpha_2)}\right]\]
where \(\hat\theta^*_{(\alpha)}\) is the \(\alpha\)-quantile of \(\{\hat\theta^{*(1)}, \ldots, \hat\theta^{*(B)}\}\).
| Interval | Coverage | Entirely above \(\theta\) | Entirely below \(\theta\) | Mean length |
|---|---|---|---|---|
| Percentile | 0.898 | 0.077 | 0.025 | 0.47 |
| BCa | 0.912 | 0.055 | 0.033 | 0.51 |
| Fisher \(z\) | 0.930 | 0.044 | 0.026 | 0.50 |
where Fisher’s \(z\): \(\tanh\bigl(\operatorname{artanh}\hat\theta \pm z_{0.975}/\sqrt{n-3}\bigr)\), the normal-theory interval for a correlation.
| Interval | Coverage | \(\theta\) below lower limit | \(\theta\) above upper limit |
|---|---|---|---|
| Percentile | 0.894 | 0.013 | 0.092 |
| Basic | 0.871 | 0.007 | 0.122 |
| Bootstrap-t | 0.943 | 0.013 | 0.044 |
| BCa | 0.910 | 0.022 | 0.068 |
| \(t\) interval | 0.912 | 0.004 | 0.084 |
| Exact | 0.954 | 0.020 | 0.025 |
where \(t\) interval: \(\bar x \pm t_{n-1, 0.975}\, S/\sqrt{n}\); exact: \(2n\bar x / \chi^2_{2n}\) quantiles, the interval that knows \(F\) is exponential.
BCa Is the Default Interval
For smooth statistics at moderate sample sizes, BCa corrects both bias and skewness, respects monotone transformations, and costs only \(n\) extra leave-one-out calculations on top of the bootstrap. It is the recommended interval unless you have reason to choose otherwise.
where \(\hat f\): a model trained on the data \(\mathcal{D}_n = \{(x_i, y_i)\}_{i=1}^n\); \(L\): the loss function; \((X, Y)\): a new observation, independent of \(\mathcal{D}_n\).
where \(L\): the loss function; \(\hat f_{(-i)}\): the model trained without observation \(i\).
| Method | Training size | Bias | Variance |
|---|---|---|---|
| LOOCV (\(k = n\)) | \(n - 1\) | Low | High |
| 10-fold | \(0.9n\) | Moderate | Moderate |
| 5-fold | \(0.8n\) | Higher | Lower |
For squared error loss at a fixed \(x\):
\[\E\bigl[(Y - \hat{f}(x))^2 \mid X = x\bigr] = \sigma^2 + \text{Bias}^2(\hat{f}(x)) + \Var(\hat{f}(x))\]
where \(f(x) = \E[Y \mid X = x]\): the true regression function; \(\E\) and \(\Var\) of \(\hat f(x)\): over training samples.
\[\widehat{\text{Err}}_{LOO} = \frac{1}{n}\sum_{i=1}^n \left(\frac{y_i - \hat{y}_i}{1 - h_{ii}}\right)^2\]
where \(\hat{\mathbf{y}} = \mathbf{H}\mathbf{y}\) with \(\mathbf{H} = \mathbf{X}(\mathbf{X}^\top\mathbf{X})^{-1}\mathbf{X}^\top\) the hat matrix; \(\mathbf{X}\): the \(n \times p\) design matrix; \(\mathbf{y}\): the responses; \(\hat y_i\): the fitted value from the full fit; \(h_{ii}\): the \(i\)th diagonal entry of \(\mathbf{H}\).
\[\widehat{\text{Err}}_{GCV} = \frac{1}{n}\sum_{i=1}^n \left(\frac{y_i - \hat{y}_i}{1 - p/n}\right)^2 = \frac{\text{RSS}/n}{(1 - p/n)^2}\]
where \(p\): the number of fitted coefficients, intercept included; \(\text{RSS} = \sum_{i=1}^n (y_i - \hat y_i)^2\); \(\mathbf{H}\): the hat matrix.
where \(\widehat{\text{Err}}_{\min}\): the smallest CV error; \(\widehat{\text{SE}}_{\min}\): the standard error of that model’s CV error.
\[\mathcal{M}_d: \quad y_i = \beta_0 + \beta_1 x_i + \beta_2 x_i^2 + \cdots + \beta_d x_i^d + \varepsilon_i, \qquad \hat f_d(x) = \sum_{j=0}^{d} \hat\beta_j x^j\]
where \(d\): the degree of the polynomial; \(\hat\beta_0, \ldots, \hat\beta_d\): the least-squares estimates, \(p = d + 1\) coefficients; \(\hat f_d\): the fitted curve for degree \(d\).
where \(d_{\min}\): the degree with the smallest CV error; \(d_{1\mathrm{SE}}\): the smallest degree whose CV error is within one SE of that minimum.
When \(F\) is unknown, the sample is all we have. Resampling from it, with replacement, without one observation, or in folds, gives standard errors, bias corrections, intervals, and an estimate of prediction error. Each method perturbs the data and watches what the statistic does.
So far the unknown was a fixed \(F\), and the sample stood in for it. Next week the unknown gets a distribution of its own: the Bayesian view, where a prior times the likelihood is proportional to the posterior, and every question about \(\theta\) is a question about that posterior.