Papers
Topics
Authors
Recent
2000 character limit reached

Anytime-Valid Confidence Sequences

Updated 22 December 2025
  • Anytime-valid confidence sequences are sequences of intervals that guarantee a specified coverage probability uniformly over all time points.
  • They are constructed using martingale methods, such as exponential and mixture martingales, to prevent type-I error inflation from continuous monitoring.
  • These sequences are vital for sequential analysis and adaptive inference, with applications in sub-Gaussian mean estimation and nonparametric testing.

An anytime-valid confidence sequence is a sequence of random sets (typically intervals or regions) for unknown parameters, designed to guarantee prescribed coverage probability not just at a single, pre-chosen sample size but uniformly over all time points and all data-dependent stopping rules. This property prevents type-I error inflation caused by continuous monitoring (“peeking”) in sequential analyses, making confidence sequences fundamental to rigorous adaptive inference in modern statistical and machine learning applications.

1. Formal Structure and Coverage Guarantee

An anytime-valid confidence sequence (CS) for a functional θ=ϕ(P)\theta=\phi(P), where PP is the data-generating law, is a sequence {Ct}t1\{C_t\}_{t\ge1} of (possibly random) sets such that

supPPP(t:  θCt)α.\sup_{P\in\mathcal{P}}\,P\bigl(\exists\,t:\;\theta\notin C_t\bigr)\le\alpha.

Equivalently, for every stopping time τ\tau—including any data-dependent rule—a uniformly valid CS satisfies

P(θCτ)1α.P\bigl(\theta\in C_\tau\bigr)\ge 1-\alpha.

This time-uniform coverage property immediately implies robust error control under optional stopping and continuation (Ramdas et al., 2020, Ramdas et al., 2022). In practical terms, the procedure remains valid regardless of when the user chooses to evaluate it, sidestepping inflated type-I error even under arbitrary peeking.

2. Martingale Foundations and Ville’s Inequality

The rigorous construction and justification of anytime-valid CSs fundamentally depend on nonnegative martingales or supermartingales. Suppose {Mt}\{M_t\} is a nonnegative supermartingale adapted to the data filtration, starting at M0=1M_0=1. Ville’s inequality states that for any α>0\alpha>0,

P(supt0Mt1/α)α,P\Bigl(\sup_{t\ge0}M_t\ge 1/\alpha\Bigr)\le\alpha,

uniformly over all underlying laws PP and all stopping times (Ramdas et al., 2020). For parametric or function-indexed models, a family of nonnegative martingales {Mtθ}θΘ\{M_t^\theta\}_{\theta\in\Theta} can be constructed such that the CS is the set of parameters not yet “rejected”: Ct={θ:supstMsθ<1/α}.C_t = \bigl\{\theta:\sup_{s\le t}M_s^\theta < 1/\alpha\bigr\}. Admissibility theory shows that all admissible anytime-valid confidence sequences must arise (possibly up to null-set modifications) as inversions of such martingale-based sequential tests; no other approach avoids being dominated or strictly improved upon without leaking type-I error (Ramdas et al., 2020).

3. Construction Methods and Key Examples

The method of constructing CSs depends on the problem structure:

  • Exponential Martingales: For sub-Gaussian or bounded support data, use exponential martingales. For mean estimation, Mt(μ;λ)=exp(λStλ22tσ2)M_t(\mu; \lambda) = \exp\left(\lambda S_t - \frac{\lambda^2}{2} t \sigma^2\right), with St=i=1t(Xiμ)S_t = \sum_{i=1}^t (X_i-\mu), where mixing over λ\lambda yields optimal nonasymptotic CSs (Ramdas et al., 2022, Ramdas et al., 2020).
  • Mixture Martingales: Mixtures over μ\mu, λ\lambda, or other tilting parameters yields closed-form CSs with coverage exact for all tt (Ramdas et al., 2022).
  • Composite Nulls and Functionals: For functionals or composite null models, pointwise martingales and their aggregates (max- or mixture-martingales) underpin admissible CSs (Ramdas et al., 2020).
  • Sequential Testing Duality: Inversion of martingale-based sequential tests yields CSs; conversely, leaving a CS implies rejection of corresponding parameter hypotheses (Gnettner et al., 14 Feb 2025).

Examples: For a sub-Gaussian mean, a universal CS is

[Xˉt±t+1tln((t+1)/α2)t]\left[\bar{X}_t \pm \sqrt{\frac{t+1}{t} \frac{\ln((t+1)/\alpha^2)}{t}}\right]

holding uniformly over tt (Ramdas et al., 2020).

4. Admissibility, Optimality, and Improvements

Ramdas et al. (Ramdas et al., 2020) comprehensively analyze admissibility: a CS is inadmissible if it is strictly dominated by another CS that is uniformly tighter (i.e., smaller at all times, strictly smaller at some time, with equal or better error control). The main results include:

  • Max-martingale construction: For singleton nulls, admissibility is characterized via Doob–Lévy max-martingales.
  • Composite nulls and dominance: Any admissible CS for composite nulls is constructed by “pasting” together admissible martingales for point nulls, extended via transfinite induction and domination arguments.
  • Extensions to e-processes and p-processes: Any admissible e-process or p-process likewise must be based on nonnegative (super)martingales, with the Snell envelope and Doob decomposition providing the formal links.
  • Sub-Gaussian supermartingale optimality: The classical sub-Gaussian exponential supermartingale is shown to be admissible—no alternative can strictly improve its performance without losing validity (Ramdas et al., 2020).

The universal principle established is:

“Admissible anytime-valid sequential inference for testing or confidence must be built from nonnegative martingales—explicitly for e-values and tests, or implicitly (via inversion) for p-values and confidence sequences. No other structure can uniformly dominate martingale-based procedures without violating validity.” (Ramdas et al., 2020)

5. Practical Implementation Strategies

Typical recipes to implement CSs from martingales:

  1. Choice of family: Select a martingale or supermartingale family satisfying the required conditional mean or moment generating function constraints for the null hypothesis.
  2. Mixing distributions: When necessary, mix over priors (e.g., Gaussian for normal means), yielding mixture martingales with tight finite-sample bounds.
  3. Boundary inversion: At each time tt, invert Mt(θ)<1/αM_t(\theta) < 1/\alpha to obtain CtC_t; extract endpoints or regions as needed.
  4. Sequential algorithms: For parameter grids, vectorize martingale updates; use FFT or precomputed log-masses for efficiency.
  5. Monitoring and reporting: Report the intersection of all CSs across tt or signal crossings when a parameter is excluded.
  6. Implementation tips: Exploit models’ structure for computational savings, maintain running maxima/minima, and adapt mixing for variance or prior knowledge.

6. Illustrative Applications and Extensions

  • Classical mean estimation: Sub-Gaussian CSs, e.g., [Xˉt±t+1tln((t+1)/α2)/t]\left[\bar X_t \pm \sqrt{\frac{t+1}{t} \ln((t+1)/\alpha^2)/t}\right] (Ramdas et al., 2020), remain tight and admissible relative to classical fixed-horizon methods.
  • Symmetry testing: Recent constructions demonstrate domination over earlier NSM-based methods—they yield strictly narrower CSs under symmetry alternatives (Ramdas et al., 2020).
  • Composite and nonparametric inference: Martingale-based CSs extend to testing symmetry, quantiles, functionals, through appropriate exponential or mixture martingale designs, supporting parametric and nonparametric sequential inference (Ramdas et al., 2022).
  • Adaptive inference in streaming and sequential decision making: Martingale-based CSs are the foundational tools for robust adaptive statistical inference under sequential data acquisition, continuous monitoring, and arbitrary data-dependent stopping (Ramdas et al., 2020, Ramdas et al., 2022).

7. Fundamental Insights and Limitations

Every admissible, anytime-valid sequential inference procedure—be it for confidence intervals, p-processes, or e-processes—must fundamentally leverage nonnegative (super)martingales. No alternative procedure is universally valid, dominates, or is strictly tighter without risk of type-I error inflation. Advanced martingale constructions (max-martingales, Snell envelopes, Doob decomposition, transfinite induction) are necessary for rigorous admissibility theory in composite and nonparametric cases (Ramdas et al., 2020). Practical implementation reduces to inversion of uniformly valid martingale-based tests, and all extensions—functionals, symmetry, regression, adaptive algorithms—remain tied to martingale theory at their core.

Whiteboard

Topic to Video (Beta)

Follow Topic

Get notified by email when new papers are published related to Anytime-Valid Confidence Sequences.