For , use . Under regular regression assumptions, the delta method gives standard error , where and estimates the covariance of the regression estimate. Resample the observational units, refit, and compute both and . A percentile bootstrap confidence interval uses the .025 and .975 quantiles of . A bootstrap-t confidence interval uses quantiles of and reverses them when solving for . If both true coefficients vanish, the first derivative is zero and the standard first-order justification is unavailable; product-specific nonregular inference is then needed.
Assume the two trial arms are independent samples, their cost and survival means have a valid joint normal approximation, and the supplied standard errors and correlation coefficient estimate the joint uncertainty in their mean differences. This could follow from a central limit theorem for patient-level cost/survival pairs, with finite second moments and suitably handled survival follow-up. The supplied covariance matrix for is
The off-diagonal entry has units pounds times days, and must not be discarded. Independence of trial arms does not mean cost and survival increments are independent: patient-level cost and survival are paired within each arm.
For a proposed ratio , the null assertion is . Its estimated variance is . Fieller's theorem inverts the associated two-sided normal tests. With , retain when
Expanding gives
The leading coefficient is positive, since ; the effect increment is separated from zero at this level. With , the polynomial is approximately
It is nonpositive between its two real roots. The resulting approximate Fieller confidence set is therefore a bounded confidence interval:
On the -day life-year scale the endpoints are approximately £9,133 and £36,376. Exact coverage would need an exact pivot with its corresponding critical value; using estimated covariance and a central limit theorem makes this an asymptotic interval. In other data, a poorly determined denominator can give unbounded or disconnected Fieller confidence sets, which should not be replaced by an artificially bounded interval.
An alternative is a paired bootstrap: independently resample patients within each randomized arm, keeping each patient's cost and survival together; recompute both mean differences and their ratio in each replicate. The and empirical ratio quantiles give a percentile bootstrap confidence interval. The raw paired data are needed to calculate it, so the numerical endpoints cannot be obtained from this summary table alone. Near-zero bootstrap effect increments or sign changes warn that ordinary ratio-percentile intervals may be unreliable; one should retain the joint cost/effect uncertainty or invert a suitable bootstrap test instead.
A simpler first-order alternative is the delta method. For , the gradient is , giving
The resulting approximate Wald confidence interval is pounds per day. Its symmetric first-order form misses the denominator's nonlinear effect, explaining its marked difference from the Fieller confidence set; it is not the preferred ratio interval here.
Let and be the empirical quantiles of the paired-bootstrap values . The percentile bootstrap confidence interval is
Its endpoints use the bootstrap distribution of the estimate itself. The regularity assumptions and resampling scheme are those in the parent solution.
Calculate the observed sample correlation coefficient . In each paired bootstrap, draw 100 indices independently with replacement from and select the corresponding whole pairs. Compute the bootstrap correlation from each resample; do not resample the two margins independently, since that would destroy their empirical dependence.
Let be the empirical -quantile of those bootstrap correlations. The percentile bootstrap confidence interval is
This is the requested algorithmic interval; the actual endpoints require the observed pairs. Its coverage is approximate, based on the sampling law of the correlation being well approximated by the bootstrap law. Both sample variances must be positive. Resamples having a constant margin have undefined correlation and cannot be repaired by arbitrarily assigning correlation zero. One may regenerate these exceptional resamples, explicitly conditioning on well-defined correlations; under the usual nondegenerate large-sample conditions their probability is negligible. Frequent degeneracy instead indicates that this ordinary correlation-bootstrap construction is unsuitable.
Set , and . The fourth-moment assumption makes finite, so the variance of a sample mean is . Assume , as required for leave-one-out estimation.
The Jackknife variance estimator recomputes the original statistic on each sample with one observation removed. Here
By the definition of the Jackknife variance estimator,
For completeness, expanding the centered sum gives
Consequently . The jackknife variance estimator is unbiased for this statistic. This calculation uses only the finite fourth moment, not normality of the original observations.
Given the observed data, put and . The empirical distribution assigns mass to each observed , including repeated values with their multiplicities. A bootstrap sample consists of independent draws from this distribution, with replacement. The nonparametric bootstrap variance estimate is the conditional variance
Independence of the bootstrap draws gives the exact conditional bootstrap variance of a sample mean:
Thus its finite-sample expectation is , in contrast to the unbiased jackknife estimate. This is the jackknife and bootstrap variance of a sample second moment scaling difference.
To approximate it by Monte Carlo simulation, independently generate bootstrap samples. For replicate , choose independent uniform indices and compute . With , use
For this is conditionally unbiased for the bootstrap variance and converges to it as . Uniform indices can be obtained by for uniforms on .
Let be the conditional bootstrap distribution of the statistic. A nominal level percentile bootstrap confidence interval is
Reuse the bootstrap replicates, sort them as , and take the order statistics with ranks and as empirical quantiles. These are quantiles of the statistic itself, rather than reflected quantiles of its centered error. Increasing reduces simulation error; it does not turn an approximate confidence interval into an exact finite-sample one.
An analytic alternative follows from the central limit theorem. If , then , and the sample variance converges to by the strong law of large numbers. The Slutsky theorem therefore gives the large-sample normal approximation interval
where is the standard normal quantile. Its lower endpoint may be truncated to zero because the parameter is nonnegative. If , almost surely and the statistic identifies the parameter exactly; the interval degenerates to that value. The nondegenerate normal interval is asymptotic, not an exact Student interval under arbitrary .
The first matrix contains the leave-one-out samples, and each element of vect is their sample mean. For ,
Thus R4a computes the jackknife variance estimator of the full sample mean:
where is the unbiased sample variance. R5a computes the estimated bias used in jackknife bias correction. The identity for the average leave-one-out sample mean gives R5a = 0, apart from floating-point rounding.
The second printed loop contains an indexing error: its row index is i, although its loop variable is b. Literally, after the first block, i equals . When , every iteration overwrites row of the new matrix; the other rows remain missing. Hence vect contains one finite mean and 198 missing entries. R's default sorting removes missing entries, leaving a vector of length one, so selecting its fifth and 195th entries gives R7b = c(NA, NA). If , the matrix assignment is out of bounds; if the second block runs independently with i undefined, it fails even earlier. This is a source error, not a property of the bootstrap.
Replacing just the row index by b gives the intended algorithm: draw 199 independent bootstrap samples and sort their sample means as . The two indices are and , so
These are the endpoints of an approximate 95% percentile bootstrap confidence interval for the population mean. Their actual numerical values depend on the supplied data and random draws, which are not specified. They are not the reflected endpoints of a basic bootstrap confidence interval, and the choice of ranks does not guarantee exact finite-sample coverage.
A percentile bootstrap confidence interval takes the lower and upper chosen quantiles of the conditional bootstrap distribution of the estimator itself. With simulated estimates, ranks near and provide an approximate central confidence interval. Unlike a basic bootstrap confidence interval, the endpoints are not reflected about the observed estimate. Coverage requires suitable regularity and accurate bootstrap approximation; the ranks do not establish exact finite-sample coverage.