BootstrapCIResult
The result of a bootstrap confidence interval computation, containing three CI methods.
All three intervals are computed from the same set of bootstrap resamples, so they can be compared directly without re-running the bootstrap.
Example:
val result = bootstrapCI(
doubleArrayOf(23.0, 25.0, 27.0, 30.0, 32.0, 28.0),
nResamples = 10_000,
random = Random(42),
) { it.average() }
result.percentile // ConfidenceInterval(lower=24.83..., upper=30.33...)
result.bca // ConfidenceInterval(lower=24.96..., upper=30.49...)
result.basic // ConfidenceInterval(lower=24.66..., upper=30.16...)Constructors
Properties
the basic (pivotal) confidence interval, which reflects the bootstrap distribution around the observed statistic. Defined as twice the observed statistic minus the opposite-tail quantile of the bootstrap distribution.
the bias-corrected and accelerated (BCa) confidence interval. Adjusts for both median bias and skewness of the bootstrap distribution using a jackknife acceleration factor. Generally the most accurate of the three methods.
the confidence level used to compute the intervals.
the number of bootstrap resamples that were generated.
the value of the statistic computed on the original data.
the percentile confidence interval, computed from quantiles of the bootstrap distribution. Simple and intuitive but does not correct for bias or skewness.