Algorithm Search⌘K

Definitionresearch

Confidence sequence

Also called anytime-valid confidence interval.

A sequence of confidence sets that contains the true parameter at all times at once with probability 1 - alpha, so it stays valid at any stopping time.

A confidence sequence is a sequence of confidence sets C1,C2,…C_1, C_2, \ldots, one after each new observation, such that with probability at least 1−α1 - \alpha the true parameter lies in every one of them at the same time. A fixed-sample confidence interval covers the parameter at one planned sample size; a confidence sequence covers it at all sample sizes together, so the analyst can watch the interval shrink, stop at any time for any reason, and still report a set with coverage 1−α1 - \alpha. The usual construction inverts a family of test martingales with Ville's inequality. Darling and Robbins introduced the idea in 1967.

Definition

Let X1,X2,…X_1, X_2, \ldots be observations with a distribution PP from a model P\mathcal P, let θ(P)\theta(P) be a parameter with values in a set Θ\Theta, and let Ft=σ(X1,…,Xt)\mathcal F_t = \sigma(X_1, \ldots, X_t).

Definition. A (1−α)(1 - \alpha) confidence sequence for θ\theta is a sequence of sets Ct⊆ΘC_t \subseteq \Theta, t≥1t \ge 1, where each CtC_t is a function of X1,…,XtX_1, \ldots, X_t, such that

P(θ(P)∈Ct for all t≥1)≥1−αfor every P∈P.P\bigl(\theta(P) \in C_t \text{ for all } t \ge 1\bigr) \ge 1 - \alpha \quad \text{for every } P \in \mathcal P.

Equivalent form. The sets (Ct)(C_t) form a (1−α)(1 - \alpha) confidence sequence if and only if P(θ(P)∈Cτ)≥1−αP(\theta(P) \in C_\tau) \ge 1 - \alpha for every P∈PP \in \mathcal P and every stopping time τ\tau with respect to (Ft)(\mathcal F_t), where τ\tau may take the value ∞\infty and the event {θ∈C∞}\{\theta \in C_\infty\} is read as "true" (Howard, Ramdas, McAuliffe and Sekhon 2021). Proof. If the uniform statement holds, then {θ∉Cτ}⊆{∃t:θ∉Ct}\{\theta \notin C_\tau\} \subseteq \{\exists t: \theta \notin C_t\}, which has probability at most α\alpha; this direction holds even for random times that are not stopping times. Conversely, fix PP, write θ=θ(P)\theta = \theta(P), and let τ=inf⁡{t:θ∉Ct}\tau = \inf\{t : \theta \notin C_t\}. It is a stopping time. For each NN, τ∧N\tau \wedge N is a stopping time and {θ∉Cτ∧N}={τ≤N}\{\theta \notin C_{\tau \wedge N}\} = \{\tau \le N\}, so P(τ≤N)≤αP(\tau \le N) \le \alpha. Letting N→∞N \to \infty gives P(∃t:θ∉Ct)=P(τ<∞)≤αP(\exists t: \theta \notin C_t) = P(\tau < \infty) \le \alpha. □\square

Construction from test martingales. Suppose that for each θ∈Θ\theta \in \Theta there is a process Mt(θ)M_t(\theta), computable from X1,…,XtX_1, \ldots, X_t, which is a test supermartingale under every PP with θ(P)=θ\theta(P) = \theta. Let

Ct={θ∈Θ:Mt(θ)<1/α}.C_t = \{\theta \in \Theta : M_t(\theta) < 1/\alpha\}.

Then (Ct)(C_t) is a (1−α)(1 - \alpha) confidence sequence: for the true θ\theta, the event that some CtC_t misses it is the event that Mt(θ)≥1/αM_t(\theta) \ge 1/\alpha for some tt, which has probability at most α\alpha by Ville's inequality. The running intersection Ct′=C1∩⋯∩CtC'_t = C_1 \cap \cdots \cap C_t misses θ\theta only if some CsC_s does, so it is also a confidence sequence, and it never grows. This is the sequential form of test-interval duality.

Examples and non-examples

The normal mixture confidence sequence. Let XiX_i be i.i.d. N(μ,1)N(\mu, 1), St=X1+⋯+XtS_t = X_1 + \cdots + X_t and Xˉt=St/t\bar X_t = S_t/t. For each μ\mu, mixing the exponential martingale exp⁡(λ(St−tμ)−λ2t/2)\exp(\lambda(S_t - t\mu) - \lambda^2 t/2) over λ∼N(0,ρ2)\lambda \sim N(0, \rho^2) gives the test martingale

Mt(μ)=11+tρ2exp⁡(ρ2(St−tμ)22(1+tρ2)).M_t(\mu) = \frac{1}{\sqrt{1 + t\rho^2}}\exp\left(\frac{\rho^2 (S_t - t\mu)^2}{2(1 + t\rho^2)}\right).

Solving Mt(μ)<1/αM_t(\mu) < 1/\alpha for μ\mu gives the interval Xˉt±wt\bar X_t \pm w_t with

wt=1t1+tρ2ρ2(2log⁡1α+log⁡(1+tρ2)).w_t = \frac1t\sqrt{\frac{1 + t\rho^2}{\rho^2}\left(2\log\frac1\alpha + \log(1 + t\rho^2)\right)}.

The free parameter ρ>0\rho > 0 chooses the sample sizes where the interval is tightest. With ρ=1\rho = 1 and α=0.05\alpha = 0.05, against the fixed-sample half-width 1.96/t1.96/\sqrt t:

tt 10 100 1000 10 000
confidence sequence wtw_t 0.9606 0.3273 0.1136 0.0390
fixed-sample 1.96/t1.96/\sqrt t 0.6198 0.1960 0.0620 0.0196
ratio 1.55 1.67 1.83 1.99

The ratio grows like log⁡t\sqrt{\log t}, since wt∼log⁡t/tw_t \sim \sqrt{\log t / t}.

Non-example: the fixed-sample interval at every step. The interval Xˉt±1.96/t\bar X_t \pm 1.96/\sqrt t covers μ\mu with probability 0.95 at each fixed tt, but not at all tt together. In 1000 simulated paths of N(0,1)N(0, 1) data, it missed the true mean at some t≤100t \le 100 in 38.6% of the paths, at some t≤1000t \le 1000 in 52.4%, and at some t≤10 000t \le 10\,000 in 64.0%; the normal mixture sequence above with ρ=1\rho = 1 missed at some t≤10 000t \le 10\,000 in 3.1%. By the law of the iterated logarithm, lim sup⁡t∣St−tμ∣/2tlog⁡log⁡t=1\limsup_t |S_t - t\mu| / \sqrt{2t \log\log t} = 1 almost surely, so the fixed-sample interval misses the mean infinitely often with probability 1.

A union bound example. Choose αt=α/(t(t+1))\alpha_t = \alpha/(t(t+1)), which add up to α\alpha, and take the fixed-sample interval at level 1−αt1 - \alpha_t at each tt. By the union bound this is a confidence sequence. It is valid but wide: for the normal model with α=0.05\alpha = 0.05 its half-width z1−αt/2/tz_{1 - \alpha_t/2}/\sqrt t is 1.1088, 0.4567, 0.1724 and 0.0622 at t=10t = 10, 100, 1000 and 10 000, which is 1.15 to 1.59 times the mixture width wtw_t of the table. The squared quantile grows like 4log⁡t4\log t against log⁡t\log t for the mixture, so the ratio tends to 2, slowly.

Bounded data. For Xi∈[0,1]X_i \in [0, 1] with conditional mean μ\mu, the betting products ∏i≤t(1+λi(Xi−μ))\prod_{i \le t}(1 + \lambda_i(X_i - \mu)) of the test martingale page give a confidence sequence for μ\mu with no other assumption. The Hoeffding supermartingale gives a simpler one with a closed form.

Non-example: stop when the interval looks good. An analyst computes the fixed-sample interval after each observation, stops at the first tt where it excludes 0, and reports that interval. The report is CτC_\tau for a stopping time τ\tau, so by the equivalence above its coverage is at least 1−α1 - \alpha under every such rule only when the whole sequence is a confidence sequence. With true mean 0 and at most 1000 observations, the simulation above shows that this rule ends with an interval that misses 0 in 52.4% of the paths.

  • Confidence interval. The fixed-sample notion, with P(θ∈Cn)≥1−αP(\theta \in C_n) \ge 1 - \alpha for one nn fixed in advance. A confidence sequence restricted to one tt is a confidence interval; the converse fails, as shown above.
  • Width. No confidence sequence for a mean with finite variance σ2\sigma^2 can have width c σ2log⁡log⁡t/tc\,\sigma\sqrt{2\log\log t / t} with c<1c < 1 for all large tt, by the law of the iterated logarithm, since such intervals miss the mean infinitely often almost surely. Howard et al. (2021) construct stitched boundaries with width of order log⁡log⁡t/t\sqrt{\log\log t / t}; the normal mixture has the larger order log⁡t/t\sqrt{\log t / t} but smaller constants over a planned range of tt.
  • Always valid confidence interval. Inverting the mixture SPRT gives the normal mixture confidence sequence above; Johari, Koomen, Pekelis and Walsh (2022) call its running intersection an always valid confidence interval and use it in online experiments.
  • Repeated confidence intervals. In a group sequential design, intervals computed at a few planned analyses with the group sequential critical values cover the parameter at all analyses together. They are confidence sequences for a finite set of times.
  • Sequential tests. A confidence sequence gives an anytime-valid test of θ=θ0\theta = \theta_0: reject at the first tt with θ0∉Ct\theta_0 \notin C_t. Its type I error is at most α\alpha by the definition.

References

  1. D. A. Darling and Herbert Robbins, Confidence sequences for mean, variance, and median, Proceedings of the National Academy of Sciences 58(1) (1967), pages 66 to 68, the definition of a confidence sequence and the first constructions for the mean, the variance and the median
  2. Steven R. Howard, Aaditya Ramdas, Jon McAuliffe and Jasjeet Sekhon, Time-uniform, nonparametric, nonasymptotic confidence sequences, Annals of Statistics 49(2) (2021), pages 1055 to 1080, the equivalence of time-uniform coverage and coverage at stopping times, the normal mixture boundary, and stitched boundaries with iterated-logarithm width
  3. Steven R. Howard, Aaditya Ramdas, Jon McAuliffe and Jasjeet Sekhon, Time-uniform Chernoff bounds via nonnegative supermartingales, Probability Surveys 17 (2020), pages 257 to 317, the supermartingale constructions behind time-uniform boundaries, with Ville's inequality
  4. Herbert Robbins, Statistical methods related to the law of the iterated logarithm, Annals of Mathematical Statistics 41(5) (1970), pages 1397 to 1409, the method of mixtures and the resulting boundary-crossing bounds for sums
  5. Ramesh Johari, Pete Koomen, Leonid Pekelis and David Walsh, Always valid inference, continuous monitoring of A/B tests, Operations Research 70(3) (2022), pages 1806 to 1821, always valid confidence intervals obtained by inverting the mixture SPRT

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/5X8RTE/text.yaml