/** * vigiles — significance testing for eval A/B arms. * * The eval tier already reports mean ± se per arm; this answers the question that * `assertImproves(..., { by: se })` punted to the user: is the gap between two * arms real, or noise? A Welch's t-test over the per-arm summary stats (mean, se, * n) — no raw rows needed — yields a two-sided p-value and a significance verdict. * Pure + model-free, so it's fully unit-tested against known t-table values. * * For 0/1 (proportion) metrics this is the t approximation to the two-proportion * test — close at the trial counts evals use, and one code path for any metric. * The numerics (log-gamma, incomplete beta) are specialized to the argument range * these tests produce (a, b ≥ 0.5; x ∈ (0,1)); they are not a general library. */ import type { EvalReport } from "./eval.js"; /** Regularized incomplete beta I_x(a, b) ∈ [0, 1]. */ export declare function regularizedIncompleteBeta(a: number, b: number, x: number): number; /** Two-sided p-value for Student's t with `df` degrees of freedom. */ export declare function tPValueTwoSided(t: number, df: number): number; /** The verdict on one arm-vs-baseline comparison for a single metric. */ export interface Comparison { /** mean(arm) − mean(baseline). */ readonly delta: number; /** Combined standard error of the difference. */ readonly seDelta: number; /** Welch t statistic (delta / seDelta). */ readonly t: number; /** Welch–Satterthwaite degrees of freedom. */ readonly df: number; /** Two-sided p-value for the difference. */ readonly pValue: number; /** p < alpha — the difference is unlikely to be noise. */ readonly significant: boolean; } type Summary = { readonly mean: number; readonly se: number; readonly n: number; }; /** Welch's unequal-variance t-test between two arms' summary stats. */ export declare function welchTTest(arm: Summary, baseline: Summary, alpha?: number): Comparison; /** * Compare two arms on a metric using their reported summary stats, or null if * either arm/metric is absent. The grounded form of `assertImproves`'s `by`: it * computes the noise floor instead of asking the caller to supply it. */ export declare function compareArms(report: EvalReport, baseline: string, arm: string, metric: string, alpha?: number): Comparison | null; export {}; //# sourceMappingURL=stats.d.ts.map