/** * Bootstrap confidence intervals and significance testing */ /** * Bootstrap confidence interval for a metric. * * Uses resampling with replacement to estimate the sampling distribution * of a statistic and calculate confidence intervals. * * @param samples - Observed metric values * @param confidence - Confidence level (default: 0.95 for 95% CI) * @param nBootstrap - Number of bootstrap samples (default: 10000) * @param seed - Random seed for reproducibility (optional) * @returns Lower and upper bounds of CI and mean estimate * * @example * ```typescript * const scores = [0.82, 0.85, 0.78, 0.90, 0.87, 0.83, 0.86, 0.89, 0.84, 0.88]; * const ci = bootstrapCI(scores, 0.95, 10000, 42); * console.log(ci.lower); // e.g., 0.82 * console.log(ci.upper); // e.g., 0.88 * console.log(ci.mean); // e.g., 0.85 * ``` */ export declare const bootstrapCI: (samples: number[], confidence?: number, nBootstrap?: number, seed?: number) => { lower: number; upper: number; mean: number; }; /** * Bootstrap test for significant difference between methods. * * Tests whether the difference between two methods is statistically * significant by bootstrapping the distribution of differences. * * @param method1Samples - Samples from method 1 * @param method2Samples - Samples from method 2 * @param nBootstrap - Number of bootstrap samples (default: 10000) * @param alpha - Significance level (default: 0.05) * @param seed - Random seed for reproducibility (optional) * @returns p-value, mean difference, and confidence interval for difference * * @example * ```typescript * const miScores = [0.85, 0.82, 0.88, 0.90, 0.87]; * const baselineScores = [0.65, 0.70, 0.68, 0.72, 0.69]; * const result = bootstrapDifferenceTest(miScores, baselineScores, 10000, 0.05, 42); * console.log(result.pValue); // e.g., 0.002 (significant) * console.log(result.meanDifference); // e.g., 0.17 * console.log(result.ci.lower); // e.g., 0.12 * console.log(result.ci.upper); // e.g., 0.22 * ``` */ export declare const bootstrapDifferenceTest: (method1Samples: number[], method2Samples: number[], nBootstrap?: number, alpha?: number, seed?: number) => { pValue: number; meanDifference: number; ci: { lower: number; upper: number; }; significant: boolean; }; //# sourceMappingURL=bootstrap.d.ts.map