Skip to main content

paired_ci

Function paired_ci 

Source
pub fn paired_ci<F>(
    baseline: &[f64],
    candidate: &[f64],
    statistic: F,
    iterations: usize,
    seed: Option<u64>,
) -> CiResult
where F: Fn(&[f64], &[f64]) -> f64,
Expand description

Bootstrap the statistic over paired samples.

  • baseline and candidate must have equal length (caller enforces).
  • statistic maps (baseline_slice, candidate_slice) to a scalar.
  • iterations defaults to DEFAULT_ITERATIONS when 0 is passed.
  • seed: pass Some(seed) for reproducible tests, None for a random OS-seeded RNG.

Returns the 2.5 / 50 / 97.5 percentiles of the bootstrap distribution.