What does Private-Channel Rate Shaping conclude, in numbers, about “Closing the Loop: a Weekly Review, the Rate Shaper and a Pre-Registered Test”?
Answer: Chapter 8 gives a six-step weekly loop, the distilled "Compliant Reach Rate Shaper" and a pre-registered test needing 78390 messages per arm. Boxes separate published evidence, runnable Python calculations (18 programs), classical sources and the author's hypotheses.
Scope of the numbers: An illustrative plan averaging 10.0 messages a minute still has 420 refused when sent in batches, and none once a token bucket of depth 20 shapes it. Parameters are illustrative, platform figures carry the document and the date read, and all numbers come from the book's programs, which read and write no file and use no network.
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: 78390
| test | rates | messages per arm |
|---|---|---|
| T1 consent lever | 0.0015 v 0.0010 | 78390 |
| T2 frequency lever | 0.0015 v 0.0010 | 78390 |
| T3 timing equivalence | 0.0010 +- 0.0005 | 68443 |
| weeks at 30100 messages a week per arm: T1 2.6, T3 2.3 | ||
| weeks at 10000 messages a week per arm: T1 7.8, T3 6.8 |
Show the full program
# Chapter 8. p82: sample sizes for the pre-registered tests.
# Two-sided alpha = 0.05, power 0.80, messages per arm, normal
# approximation for two proportions. Every arm is compliant: consented
# contacts only, stop honoured at send time, shaped under the cap.
# T1 consent lever: single opt-in 0.0015 against confirmed (double)
# opt-in 0.0010 objections per message.
# T2 frequency lever: 2 a week 0.0015 against 1 a week 0.0010.
# T3 timing equivalence: shaped even pacing against batches that stay
# inside the cap, both near 0.0010; TOST with margin 0.0005, so
# alpha one-sided 0.05 twice and the 0.80 power split.
# Illustrative rates; the real ones come from the first month's log.
import math
from statistics import NormalDist
Z = NormalDist()
def two_prop(p1, p2, alpha=0.05, power=0.80):
za, zb = Z.inv_cdf(1 - alpha / 2), Z.inv_cdf(power)
pb = (p1 + p2) / 2
num = (za * math.sqrt(2 * pb * (1 - pb))
+ zb * math.sqrt(p1 * (1 - p1) + p2 * (1 - p2))) ** 2
return math.ceil(num / (p1 - p2) ** 2)
def tost(p, margin, alpha=0.05, power=0.80):
za, zb = Z.inv_cdf(1 - alpha), Z.inv_cdf(1 - (1 - power) / 2)
return math.ceil((za + zb) ** 2 * 2 * p * (1 - p) / margin ** 2)
print("test rates messages per arm")
n1 = two_prop(0.0015, 0.0010)
print("T1 consent lever 0.0015 v 0.0010 %16d" % n1)
print("T2 frequency lever 0.0015 v 0.0010 %16d" % n1)
n3 = tost(0.0010, 0.0005)
print("T3 timing equivalence 0.0010 +- 0.0005 %16d" % n3)
for weekly in (6020 * 5, 2000 * 5):
print("weeks at %5d messages a week per arm: T1 %.1f, T3 %.1f"
% (weekly, n1 / weekly, n3 / weekly))Single source and citation
Fan, Y. (2026). Rate Control for Private Messaging Channels without Account Bans: Token-Bucket Shaping, Platform-Published Limits and Consent-Based Reach Throughput (Version 1.0.0), Chapter 8: Closing the Loop: a Weekly Review, the Rate Shaper and a Pre-Registered Test. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-271 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026271,
author = {Fan, Yafu},
title = {Rate Control for Private Messaging Channels without Account Bans: Token-Bucket Shaping, Platform-Published Limits and Consent-Based Reach Throughput},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Bursts That Are Compliant on Average: Sliding-Window Caps and the b + rW Bound of the Token Bucket
- Chapter 2 · Who Decides Account Quality: Consent Rates, Negative Feedback and a Markov Chain of Tiers
- Chapter 3 · Overflow under Poisson Arrivals: the Bucket Depth Only Shifts the Tail of the Leaky-Bucket Queue
- Chapter 4 · Leaky Buckets, Token Buckets and Two Limits at Once: Per-Minute Shaping and Distinct Recipients in 24 Hours
- Chapter 5 · Slowing Down on Feedback: Additive Increase, Multiplicative Decrease and Wald's Sequential Test
- Chapter 6 · Red Lines outside the Model: Stop Means Stop, Quiet Hours, Vulnerable Readers to a Person, and No Pretending
- Chapter 7 · Pulling Up Shoots and Telephone Traffic: Mencius's Parable and Erlang's Paper of 1909