/** * How much of a score is signal. * * A suite reported a mean and nothing else, so two experiments differing by three * points read as a difference. At the n a hand-built suite has, that is * usually noise, and there was no number on the page that would have said * so. * * Evan Miller, "Adding Error Bars to Evals" (arXiv:2411.00640), is the * reference. Two of its results shape what is and is not computed here. */ export interface ScoreUncertainty { /** Cases that produced a score. Not the number of cases run. */ readonly n: number; /** Sample standard deviation, Bessel-corrected. */ readonly stdDev: number; /** Standard error of the mean. */ readonly stdError: number; /** Half-width of the 95% interval: the mean plus or minus this. */ readonly margin95: number; /** * The 95% interval, clamped to the score range. * * Clamped because a mean of 0.95 with a wide interval otherwise reports * an upper bound above 1, which is not a possible score and makes a * reader distrust the whole figure. The clamp is cosmetic and the * margin above is not — read that one for the width. */ readonly ci95: readonly [low: number, high: number]; /** * True when there is not enough data for an interval at all. * * One case has no spread to measure. Reporting `±0` there would be the * most confident-looking output the suite can produce, from the least * evidence it can have. */ readonly undefinedInterval: boolean; } /** * Spread of a set of scores, with the interval a reader should apply. * * **Assumes the cases are independent, and they may not be.** Miller's * clustered standard errors run up to 3x the naive figure when cases come * in related groups — several cases derived from one scenario, or one * document, or one seed. This harness has no grouping key on a case, so * there is nothing here to cluster on and this returns the naive figure. * Where a suite does build several cases from one source, treat the * interval below as a floor rather than as the answer. * * Stated rather than silently assumed because a too-narrow interval is * worse than none: it turns "we cannot tell" into a number that looks * like we can. */ export declare function uncertaintyOf(scores: readonly number[]): ScoreUncertainty; /** * One line a reader can act on, for a surface that prints a score. * * Names the interval rather than only the mean, because the mean alone is * the thing that has been over-read. An interval spanning most of the * scale says the suite cannot currently tell two experiments apart, and that is * the most useful sentence such a suite can produce. */ export declare function describeUncertainty(mean: number, u: ScoreUncertainty): string; //# sourceMappingURL=uncertainty.d.ts.map