pub fn compute_bootstrap(
samples: &[f64],
config: &BootstrapConfig,
) -> Result<BootstrapResult, BootstrapError>Expand description
Compute bootstrap confidence interval for the mean
Automatically selects BCa method for small samples (N < 100).
§Examples
ⓘ
let samples = vec![100.0, 102.0, 98.0, 101.0, 99.0];
let config = BootstrapConfig::default();
let result = compute_bootstrap(&samples, &config).unwrap();
println!("Mean: {}", result.point_estimate);
println!("95% CI: [{}, {}]",
result.confidence_interval.lower,
result.confidence_interval.upper);