/**
 * Always-valid sequential evaluation.
 *
 * `researchReport` assumes a single pre-specified analysis. Real
 * consumers run campaigns weekly / nightly / per-PR; each new run silently
 * inflates the false-discovery rate, because the BH-FDR guarantee is for
 * the *first* look, not the 47th. Without time-uniform inference,
 * launch-decision teams either (a) don't peek, which forfeits the cost
 * advantage of stop-when-decisive, or (b) peek and pretend they didn't,
 * which forfeits scientific validity.
 *
 * This module ships **e-value-based confidence sequences** for paired
 * bounded outcomes. The methodology is the predictable plug-in betting
 * martingale of Waudby-Smith & Ramdas (2024) — provably valid at *any*
 * stopping time. Concretely:
 *
 *   For paired deltas D_1, D_2, … ∈ [-c, c] with the null H_0: E[D] ≤ 0,
 *   a betting fraction λ_i is chosen using only D_{1..i-1} (predictable
 *   plug-in), and the running e-value is
 *
 *     E_t = ∏_{i=1}^{t} (1 + λ_i · D_i)
 *
 *   E_t is a non-negative martingale under H_0 with E[E_t] ≤ 1, so by
 *   Ville's inequality, P(∃ t : E_t ≥ 1/α) ≤ α — we can reject the null
 *   at any time without inflating the type-I error.
 *
 * Combined with `runEvalCampaign`, every consumer running rolling
 * campaigns gains the ability to ship the moment evidence is decisive,
 * stop-early on dead-on-arrival variants, and accumulate evidence across
 * partial runs without spending the FDR budget. No new sweep is wasted.
 *
 * References:
 *   - Howard, S. R., Ramdas, A., McAuliffe, J., Sekhon, J. (2021).
 *     Time-uniform, nonparametric, nonasymptotic confidence sequences.
 *     Annals of Statistics, 49(2), 1055–1080.
 *   - Waudby-Smith, I., Ramdas, A. (2024). Estimating means of bounded
 *     random variables by betting. JRSS B, 86(1), 1–27.
 */
export type SequentialDecision = 'promote_now' | 'continue' | 'reject_now' | 'equivalent';
export interface PairedEvalueOptions {
    /**
     * Bound on |delta|. Default 1 (matching most score scales). Must satisfy
     * c > 0; deltas outside [-c, c] are clipped with a warning attached to
     * the return value.
     */
    bound?: number;
    /** Target Type-I error. Default 0.05. */
    alpha?: number;
    /**
     * Region of Practical Equivalence on the *mean* paired delta. When
     * supplied, the verdict can return `'equivalent'` once the running
     * confidence sequence on the mean is fully contained in [low, high].
     */
    rope?: {
        low: number;
        high: number;
    };
    /** Initial bet shrinkage (0 < scale ≤ 1). Default 0.5 — empirically robust. */
    initialBetShrinkage?: number;
}
export interface PairedEvalueStep {
    /** 1-indexed observation count. */
    t: number;
    delta: number;
    /** Running e-value E_t = ∏ (1 + λ_i · D_i). */
    evalue: number;
    /** Time-uniform p-value at stopping time t. */
    pValue: number;
    /** Lower bound of the empirical Bernstein confidence sequence at level 1-α. */
    csLow: number;
    csHigh: number;
    /** Verdict at this stopping time. */
    decision: SequentialDecision;
}
export interface PairedEvalueSequence {
    steps: PairedEvalueStep[];
    /** The decision at the final step. */
    finalDecision: SequentialDecision;
    /** Index (1-based) at which a non-`continue` decision first fired, or null. */
    decisionFiredAt: number | null;
    /** True if any deltas were clipped to [-bound, bound]. */
    clipped: boolean;
}
/**
 * Run the paired e-value sequence over an in-order delta stream.
 *
 * Use for *streaming* / interim analyses: pass the deltas you have so
 * far, get the verdict at every prefix length. The decision is
 * monotone-stable in the sense that once `'reject_now'` or `'promote_now'`
 * fires, the verdict at later steps remains decisive (the e-value is a
 * non-negative martingale; once it crosses the threshold, it's crossed).
 */
export declare function pairedEvalueSequence(deltas: number[], opts?: PairedEvalueOptions): PairedEvalueSequence;
export interface InterimReleaseConfidenceInput {
    /**
     * One delta series per candidate (paired deltas vs comparator). Order
     * within a series is the order the campaigns were run.
     */
    deltaSeries: Array<{
        candidateId: string;
        deltas: number[];
    }>;
    alpha?: number;
    bound?: number;
    rope?: {
        low: number;
        high: number;
    };
}
export interface InterimReleaseConfidence {
    candidates: Array<{
        candidateId: string;
        decision: SequentialDecision;
        decisionFiredAt: number | null;
        finalEvalue: number;
        finalPValue: number;
        pairs: number;
        csLow: number;
        csHigh: number;
    }>;
    /**
     * Campaign-level recommendation: pick the strongest 'promote_now', else
     * 'continue' if any candidate is still live, else 'reject_now' if every
     * candidate is dead, else 'equivalent'.
     */
    recommendation: {
        decision: SequentialDecision;
        candidateId: string | null;
    };
}
/**
 * Run interim sequential analyses across many candidates at once,
 * preserving the time-uniform α guarantee for each candidate's series and
 * synthesising a campaign-level recommendation. Designed to be called on
 * every campaign tick — the recommendation is anytime-valid.
 */
export declare function evaluateInterimReleaseConfidence(input: InterimReleaseConfidenceInput): InterimReleaseConfidence;
//# sourceMappingURL=sequential.d.ts.map