/**
 * Bootstrap confidence intervals — replaces / supplements t-test for LLM eval.
 *
 * Why bootstrap instead of t-test for LLM scores?
 *
 * 1. **No distribution assumption** — t-test assumes scores are normally
 *    distributed. LLM scores on a 1-5 ordinal scale violate this; bootstrap
 *    only requires that the sample is representative.
 * 2. **Small N robustness** — t-test's small-sample correction (df-adjusted)
 *    breaks down with N < 10. Bootstrap is consistent at any N >= 2.
 * 3. **Difference-of-means is the actual question** — In A/B eval the user
 *    asks "is variant B better than A?" — this is a 2-sample comparison and
 *    needs CI on the *difference*, not on each variant's mean separately.
 *
 * This module exports:
 *   - bootstrapMeanCI: CI for a single variant's mean
 *   - bootstrapDiffCI: CI for the difference (B - A); 0 outside the CI = significant
 *   - bootstrapWithMetric: generic interface so saturation analysis can reuse
 *
 * Reproducibility: pass a fixed `seed` to get deterministic CIs across runs.
 * Without a seed we use Math.random() — fine for production but not for tests.
 */
export interface BootstrapCI {
    /** Lower bound of the CI. */
    low: number;
    /** Upper bound of the CI. */
    high: number;
    /** The point estimate (mean of original sample, or whatever metric was passed). */
    estimate: number;
    /** Number of bootstrap resamples performed. */
    samples: number;
}
export interface BootstrapDiffCI extends BootstrapCI {
    /** Whether 0 is inside the CI — when false, the difference is statistically significant. */
    significant: boolean;
}
/**
 * Bootstrap confidence interval for the mean of a single sample.
 *
 * @param scores  Sample observations (e.g., scores from N evaluation samples).
 * @param alpha   Significance level. 0.05 = 95% CI. Default 0.05.
 * @param samples Number of bootstrap resamples. Default 1000.
 * @param seed    Optional seed for deterministic CIs (tests).
 * @returns       { low, high, estimate, samples }; all numbers rounded to 4 decimals.
 */
export declare function bootstrapMeanCI(scores: number[], alpha?: number, samples?: number, seed?: number): BootstrapCI;
/**
 * Bootstrap confidence interval for the *difference* of two sample means
 * (treatment - control). Each bootstrap iteration resamples both groups
 * independently and computes mean(B) - mean(A).
 *
 * The `significant` flag is true when 0 falls outside the CI — a clean
 * proxy for "treatment differs from control at the alpha level".
 *
 * @param scoresA  Control / baseline sample (scoresA → first group, the subtrahend in the diff).
 * @param scoresB  Treatment sample.
 * @param alpha    Significance level. Default 0.05.
 * @param samples  Bootstrap resamples. Default 1000.
 * @param seed     Optional seed.
 * @returns        BootstrapDiffCI with low/high of (B - A) and significant flag.
 */
export declare function bootstrapDiffCI(scoresA: number[], scoresB: number[], alpha?: number, samples?: number, seed?: number): BootstrapDiffCI;
/**
 * Generic bootstrap CI for an arbitrary sample-level metric. Used by
 * saturation analysis to get CI on metrics like stddev or
 * agreement, not just mean.
 *
 * @param scores   Original sample.
 * @param metricFn Function reducing a resampled array to a scalar.
 */
export declare function bootstrapWithMetric(scores: number[], metricFn: (resampled: number[]) => number, alpha?: number, samples?: number, seed?: number): BootstrapCI;
//# sourceMappingURL=bootstrap.d.ts.map