Tutorials › Response-Adaptive Randomization › Law of the Iterated Logarithm for Allocation Noise

Asymptotic Theory for Adaptive Allocation · Tutorial 233 of 501

Law of the Iterated Logarithm for Allocation Noise

Learn to center adaptive assignment counts by their predictable probabilities and interpret their almost-sure fluctuations using a martingale law of the iterated logarithm.

Advanced 12 min read

What You'll Learn

  • Define cumulative assignment noise as a martingale sum of centered treatment indicators.
  • State conditions for applying a martingale law of the iterated logarithm.
  • Derive the allocation-noise envelope from predictable conditional variance.
  • Distinguish the envelope from a central limit theorem approximation or confidence band.
  • Diagnose what changes when allocation probabilities approach a boundary.
  • Check when a changing allocation target contributes a negligible centering drift.

Why an almost-sure fluctuation envelope?

In a sequential trial, the number assigned to an arm is random, but its conditional expectation is known at each allocation step from the design’s assignment probability. Subtracting the sum of those conditional expectations isolates the random assignment noise. A central limit theorem describes a standardized fluctuation at a fixed large sample size; a law of the iterated logarithm (LIL) instead describes the largest fluctuations that occur repeatedly along one indefinitely continued sequence of allocations. Its scale is larger than the central-limit scale by a factor involving \(\sqrt{\log\log n}\).

The distinction is useful for understanding long-run sample paths. The LIL does not promise that a particular finite trial’s allocation count will stay inside a boundary. It says that, under specified conditions, the normalized cumulative noise approaches two exact extreme values infinitely often, almost surely.

Centering allocation counts

Consider a two-arm sequential design. Let \(I_i=1\) if participant \(i\) is assigned to arm 1 and \(I_i=0\) otherwise. Let \(\mathcal F_{i-1}\) represent all information available just before that assignment, and define the predictable assignment probability \(q_i=P(I_i=1\mid\mathcal F_{i-1})\). The count on arm 1 after \(n\) assignments is \(N_1(n)=\sum_{i=1}^n I_i\).

Definition: The cumulative assignment noise on arm 1 is \(M_n=\sum_{i=1}^n(I_i-q_i)=N_1(n)-\sum_{i=1}^n q_i\). Its predictable quadratic variation, or cumulative conditional variance, is \(V_n=\sum_{i=1}^n E[(I_i-q_i)^2\mid\mathcal F_{i-1}]=\sum_{i=1}^n q_i(1-q_i)\).

Because \(E[I_i\mid\mathcal F_{i-1}]=q_i\), each increment \(I_i-q_i\) has conditional mean zero. Thus \(M_n\) is a martingale: given the allocation history so far, its next increment has expectation zero. Also \(|I_i-q_i|\leq 1\), and its conditional variance is \(q_i(1-q_i)\). These facts do not require the assignments to be independent; the probability \(q_i\) may depend on the observed history.

The martingale LIL and its allocation form

A useful sufficient version of the martingale LIL is the following: for martingale differences bounded in absolute value by a fixed constant, if their cumulative conditional variance \(V_n\) tends to infinity, then \(\limsup M_n/\sqrt{2V_n\log\log V_n}=1\) and \(\liminf M_n/\sqrt{2V_n\log\log V_n}=-1\), almost surely. The expressions are considered for sufficiently large \(n\), when the iterated logarithm is defined and positive. For the assignment indicators above, boundedness is automatic. The substantive variance condition is \(V_n\to\infty\).

Theorem: Suppose assignments are sequential with predictable probabilities \(q_i\), and \(V_n=\sum_{i=1}^n q_i(1-q_i)\to\infty\) almost surely. Then the cumulative assignment noise satisfies
$$ \limsup_{n\to\infty}\frac{N_1(n)-\sum_{i=1}^n q_i}{\sqrt{2V_n\log\log V_n}}=1, \qquad \liminf_{n\to\infty}\frac{N_1(n)-\sum_{i=1}^n q_i}{\sqrt{2V_n\log\log V_n}}=-1 \quad\text{almost surely.} $$

The predictable variance, rather than simply the sample size, determines the scale. If \(q_i\to p\) almost surely for a constant \(p\) with \(0<p<1\), then the average conditional variance converges to \(p(1-p)\). In fact, by averaging the terms \(q_i(1-q_i)\), \(V_n/n\to p(1-p)\) almost surely. Substituting this into the theorem gives the equivalent asymptotic envelope

$$ \limsup_{n\to\infty}\frac{M_n}{\sqrt{2p(1-p)n\log\log n}}=1, \qquad \liminf_{n\to\infty}\frac{M_n}{\sqrt{2p(1-p)n\log\log n}}=-1 \quad\text{almost surely.} $$

The replacement of \(V_n\) by \(p(1-p)n\) is valid because their ratio tends to one, and \(\log\log V_n/\log\log n\to1\). This form requires a stable, interior limiting allocation probability. When the probabilities do not converge to such a \(p\), the predictable-variance form is the more relevant statement, provided its conditions hold.

Worked applications

Worked Example: A Stable 40% Allocation Probability

Hypothetical design. Suppose each assignment has conditional probability \(q_i=0.40\) of going to arm 1, regardless of the preceding history. The conditional variance per assignment is \(q_i(1-q_i)=0.40(0.60)=0.24\), so \(V_n=0.24n\). The increments are bounded, and \(V_n\to\infty\); therefore the martingale LIL applies.

At \(n=10{,}000\), the asymptotic LIL scale is \(\sqrt{2V_n\log\log V_n}\). Substitution gives

$$ V_{10000}=0.24(10000)=2400,\qquad \sqrt{2(2400)\log\log(2400)}\approx 99.2. $$

Equivalently, using the \(n\)-scale gives \(\sqrt{2(0.24)(10000)\log\log(10000)}\approx103.2\). The small numerical difference reflects that the equivalent scales agree asymptotically, not exactly at this sample size. The theorem says the centered count \(N_1(n)-0.40n\), when observed over an indefinitely continued sequence, reaches both normalized extremes arbitrarily close to \(+1\) and \(-1\) infinitely often. The calculation is not a 95% boundary and does not predict the realized count at \(n=10{,}000\).

Worked Example: A Slowly Changing Assignment Probability

Hypothetical design. Let \(q_i=0.35+0.20/i\), a predictable schedule that starts at \(0.55\) and tends to \(p=0.35\). It stays strictly between zero and one. The cumulative predictable allocation is \(\sum_{i=1}^n q_i=0.35n+0.20H_n\), where \(H_n=\sum_{i=1}^n1/i\).

At \(n=1000\), \(H_{1000}\approx7.485\). Thus the predictable count is \(0.35(1000)+0.20(7.485)=351.497\), rather than exactly 350. The difference from \(np\) is a drift of about 1.497 assignments.

Since \(q_i\to0.35\), the average conditional variance tends to \(0.35(0.65)=0.2275\). The asymptotic LIL scale at \(n=1000\), using the limiting-probability form, is

$$ \sqrt{2(0.2275)(1000)\log\log(1000)} =\sqrt{879.4}\approx29.65. $$

The deterministic centering drift \(0.20H_n\) grows on the order of \(\log n\), whereas the envelope grows on the order of \(\sqrt{n\log\log n}\). Their ratio tends to zero. Consequently centering by \(np\), rather than by \(\sum q_i\), does not change the LIL limit in this example. That conclusion depends on the drift being negligible on the LIL scale; it is not automatic for every changing target.

Worked Example: Variance Growth Slower Than Sample Size

Hypothetical design. Suppose \(q_i=1/(i+1)\). The assignments remain Bernoulli conditional on the history, and the increments are bounded, but the probability of arm 1 declines toward zero. Here

$$ V_n=\sum_{i=1}^n\frac{1}{i+1}\left(1-\frac{1}{i+1}\right) =\sum_{i=1}^n\left(\frac{1}{i+1}-\frac{1}{(i+1)^2}\right) \sim\log n. $$

Although \(V_n/n\to0\), the cumulative variance diverges, so the predictable-variance LIL has scale approximately \(\sqrt{2\log n\,\log\log\log n}\). It would be incorrect to substitute a fixed interior \(p\) and use a scale proportional to \(\sqrt{n\log\log n}\). This example shows why checking variance growth is essential before translating the theorem into a sample-size envelope.

Why the result holds, and how to read it

The application rests on identifying the correct martingale and its variance, not on treating adaptive assignments as independent coin tosses. Conditional centering removes the systematic change in assignment probabilities; the sum of conditional variances measures how much random allocation noise accumulates. The martingale LIL then compares the cumulative noise to the iterated-logarithm scale built from that variance.

1
Center each assignment.
Set \(D_i=I_i-q_i\). By definition of \(q_i\), \(E[D_i\mid\mathcal F_{i-1}]=0\).
2
Accumulate conditional variance.
Because \(I_i\) is conditionally Bernoulli with success probability \(q_i\), \(E[D_i^2\mid\mathcal F_{i-1}]=q_i(1-q_i)\), so \(V_n=\sum q_i(1-q_i)\).
3
Check the LIL conditions.
The increments satisfy \(|D_i|\leq1\). Verify that \(V_n\to\infty\); if using the simpler \(p\)-scale, also establish \(q_i\to p\in(0,1)\).
4
State the pathwise envelope.
Apply the martingale LIL to \(M_n=\sum D_i\), and retain the predictable-variance centering unless any target drift has been shown negligible.

The result is an almost-sure statement about a long sequence: the normalized noise has limsup \(1\) and liminf \(-1\). In particular, values arbitrarily close to each extreme recur at arbitrarily large indices. It does not claim that every value of \(M_n\) lies below the displayed scale, nor does it give a probability for crossing a boundary by a specified trial size. A finite-horizon probability statement would require a different tool and assumptions tailored to that goal.

Diagnostics, alternatives, and limitations

QuestionMartingale LILCentral limit theoremStrong law
Main descriptionAlmost-sure extremes along a long sequenceDistribution of a suitably scaled fluctuation at large sample sizeConvergence of a normalized sequence, often an allocation proportion
Typical scale for stable interior \(p\)\(\sqrt{2p(1-p)n\log\log n}\)\(\sqrt{n p(1-p)}\)Establishes a limiting proportion, not an iterated-logarithm envelope
InterpretationBoth normalized extremes are approached infinitely often, almost surelyApproximate fixed-time distribution under its conditionsLong-run convergence, not repeated extreme fluctuations

Before applying the LIL, inspect the assignment mechanism and the variance path. If \(V_n\) remains bounded, the stated theorem does not apply. If it diverges but grows much more slowly than \(n\), retain \(V_n\) rather than assuming a linear variance scale. If \(q_i\to p\) at a boundary, the interior-\(p\) simplification is unavailable. And if the scientific target \(p\) differs from the actual sequence \(q_i\), the count decomposes as \(N_1(n)-np=M_n+\sum_{i=1}^n(q_i-p)\). The second term is drift, not assignment noise; it must be assessed separately.

A common mistake is to treat the LIL boundary as a finite-sample confidence band: “at \(n=1000\), the noise has a 95% chance to be within the calculated envelope.” That conclusion does not follow. The LIL gives an almost-sure limiting statement over an infinite sequence, not a finite-sample coverage probability. Another mistake is to center at \(np\) simply because \(p\) is the limiting allocation probability. The correction is to center first at the predictable total \(\sum q_i\), then show that the difference \(\sum(q_i-p)\) is negligible relative to \(\sqrt{n\log\log n}\) before replacing that center.

The LIL is therefore complementary to, not a replacement for, a central limit theorem or a strong-law result. It gives a precise description of repeated long-run extremes, but does not by itself provide a practical stopping rule, finite-sample guarantee, or protection against misspecified assignment probabilities. In adaptive designs, the predictable-variance formulation is especially valuable because it remains tied to the actual allocation history.

Check Your Understanding

Answer each question using the conditional assignment probability and variance as the starting point.

  1. If \(q_i=0.30\) for every assignment, what is the asymptotic LIL scale for \(M_n\)?
  2. If \(q_i\to0.50\), what are the limsup and liminf of \(M_n/\sqrt{2(0.25)n\log\log n}\), almost surely?
  3. For \(q_i=0.35+0.20/i\), why can the count be centered at \(0.35n\) without changing its LIL limit?
  4. For \(q_i=1/(i+1)\), why is a scale based on a fixed interior allocation proportion inappropriate?

Solutions. (1) The conditional variance per assignment is \(0.30(0.70)=0.21\), so the scale is \(\sqrt{2(0.21)n\log\log n}\). (2) Since the limiting variance per assignment is \(0.50(0.50)=0.25\), the limsup is \(1\) and the liminf is \(-1\). (3) The predictable-count difference from \(0.35n\) is \(0.20H_n=O(\log n)\), and \(\log n/\sqrt{n\log\log n}\to0\). (4) Its predictable variance grows like \(\log n\), not linearly in \(n\); the theorem’s variance-based scale is approximately \(\sqrt{2\log n\log\log\log n}\).

Clinical Biostats