What does The Life of a Rule conclude, in numbers, about “Wald's Two Straight Lines: Boundaries, the OC Function and the Mean Sample Size”?

Answer: Wald's sequential test writes evidence as a visitor-by-visitor sum, and its two boundaries are parallel lines in the count plane with slope 0.03291 and a gap of 22.97 conversions, which anyone can compare with the cumulative visitors and conversions in a weekly report. The formulas of p22 show that the saving of "about half" holds at the baseline, 0.460, reaches only 0.616 at the target, and that middling rules between the two push the mean sample size up to 0.728 of the fixed sample. All of these are approximations that neglect the overshoot. Computed exactly, visitor by visitor, what are the true error rates and the true mean sample size? How long is the tail of the sample-size distribution, and when should a pipeline call time? Chapter 3 answers with exact recursions.

Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (20 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.03291, 0.460, 0.616, 0.728

fixed-sample n (one-sided, alpha 0.05, power 0.80): 5314
zero-drift point p* = 0.03291
true pP(KEEP)Wald ASNASN / fixed n
0.024000.00019270.174
0.027000.002813870.261
0.030000.050024440.460
0.032000.220835010.659
0.032910.359838190.719
0.034000.543138700.728
0.036000.800032750.616
0.039000.950222280.419
0.042000.987315860.298
saving at p0: 0.540saving at p1: 0.384
Show the full program
# Chapter 2. p22: Wald's OC and ASN formulas against the fixed sample
# Model: same SPRT as p21 (p0 0.03, p1 0.036, alpha 0.05, beta 0.20).
# Wald (1945, 1947) neglects the overshoot over the boundaries and gets
# OC L(p) = (e^{hA} - 1) / (e^{hA} - e^{hB}), where h != 0 solves
# p (p1/p0)^h + q (q1/q0)^h = 1, and ASN E[N] = (L B + (1 - L) A) / E z
# with E z the mean step. At the zero-drift point E[N] = -A B / E z^2.
# The fixed-sample size is the one-sided normal-approximation n for the
# same alpha and power. Illustrative parameters; no randomness.
import math
from statistics import NormalDist

P0, P1 = 0.03, 0.036
ALPHA, BETA = 0.05, 0.20
A = math.log((1 - BETA) / ALPHA)
B = math.log(BETA / (1 - ALPHA))
LA = math.log(P1 / P0)
LB = math.log((1 - P1) / (1 - P0))


def p_of_h(h):
    u, v = (P1 / P0) ** h, ((1 - P1) / (1 - P0)) ** h
    return (1 - v) / (u - v)


def h_of_p(p):
    lo, hi = -6.0, 6.0          # p_of_h falls as h rises
    for _ in range(200):
        mid = (lo + hi) / 2
        if abs(mid) < 1e-12:
            mid = 1e-9
        if p_of_h(mid) > p:
            lo = mid
        else:
            hi = mid
    return (lo + hi) / 2


def oc_asn(p):
    ez = math.fsum([p * LA, (1 - p) * LB])
    if abs(ez) < 1e-12:
        ez2 = math.fsum([p * LA * LA, (1 - p) * LB * LB])
        return A / (A - B), -A * B / ez2
    h = h_of_p(p)
    ea, eb = math.exp(h * A), math.exp(h * B)
    oc = (ea - 1) / (ea - eb)
    return oc, math.fsum([oc * B, (1 - oc) * A]) / ez


nd = NormalDist()
za, zb = nd.inv_cdf(1 - ALPHA), nd.inv_cdf(1 - BETA)
root = math.fsum([za * math.sqrt(P0 * (1 - P0)),
                  zb * math.sqrt(P1 * (1 - P1))])
n_fix = math.ceil((root / (P1 - P0)) ** 2)
p_star = -LB / (LA - LB)
print("fixed-sample n (one-sided, alpha 0.05, power 0.80): %d" % n_fix)
print("zero-drift point p* = %.5f" % p_star)
print("true p   P(KEEP)   Wald ASN   ASN / fixed n")
for p in (0.024, 0.027, 0.030, 0.032, p_star, 0.034, 0.036, 0.039,
          0.042):
    oc, asn = oc_asn(p)
    print("%.5f  %7.4f  %9.0f  %13.3f" % (p, 1 - oc, asn, asn / n_fix))
o0, n0 = oc_asn(P0)
o1, n1 = oc_asn(P1)
print("saving at p0: %.3f   saving at p1: %.3f"
      % (1 - n0 / n_fix, 1 - n1 / n_fix))

Single source and citation

Fan, Y. (2026). Empirical Retirement of Live Rules: Wiring the Sequential Probability Ratio Test into Real Conversion Streams to Promote, Demote and Retire Copy Rules (Version 1.0.0), Chapter 2: Wald's Two Straight Lines: Boundaries, the OC Function and the Mean Sample Size. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-263 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026263,
  author    = {Fan, Yafu},
  title     = {Empirical Retirement of Live Rules: Wiring the Sequential Probability Ratio Test into Real Conversion Streams to Promote, Demote and Retire Copy Rules},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book