What does Computational Bibliometrics and Self-Verifying Books conclude, in numbers, about “Surprise, Anchors and Completion”?
Answer: Chapter 2 measures surprise in bits: a correction from 10 times to 1.35 carries 12.65 bits; the best steady dose in a toy reader is 1.2 bits a section; and sales data overstate the value of anchors 3.39 times.
Scope of the numbers: Its readers, books, error rates and costs are illustrative models; all calculations are generated by its programs; the book is not legal, financial or publishing advice. Marked boxes separate published evidence, runnable Python calculations (16 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: 1.2, 1.35, 10, 12.65
| surprise of a 10x claim cut to 1.35x (log scale beliefs): | ||
| KL = 12.65 bits | ||
| schedule | total bits | completion |
| flat 0.2 bit | 8.0 | 0.0036 |
| flat 1.2 bit | 48.0 | 0.6868 |
| flat 2.5 bit | 100.0 | 0.0000 |
| pulse 1.2 every 4th | 18.0 | 0.1239 |
| pulse 2.2 / 0.2 | 48.0 | 0.0036 |
| best steady dose 1.2 bit a section, completion 0.6868 |
Show the full program
# Chapter 2. p03: Surprise pulses and completion. A section's surprise is
# the Kullback-Leibler divergence (bits) from what the reader believed to
# what the section shows. Toy reader: engagement e decays by 0.8 a
# section, gains 1.2 per bit of surprise and loses 0.5 per squared bit
# (overload); the reader quits a section with chance 1 / (1 + exp(2 e)).
# 40 sections, five schedules; then the best steady dose.
import math
from math import exp, log
def kl_normal_bits(m0, s0, m1, s1):
# KL( N(m1, s1) || N(m0, s0) ) in bits: what the reader learns when a
# belief N(m0, s0) is replaced by N(m1, s1)
nats = log(s0 / s1) + (s1 ** 2 + (m1 - m0) ** 2) / (2 * s0 ** 2) - 0.5
return nats / log(2)
def completion(sched):
e, alive = 0.0, 1.0
for s in sched:
e = 0.8 * e + 1.2 * s - 0.5 * s * s
alive *= 1 - 1 / (1 + exp(2 * e))
return alive
N = 40
SCHEDULES = (
("flat 0.2 bit", [0.2] * N),
("flat 1.2 bit", [1.2] * N),
("flat 2.5 bit", [2.5] * N),
("pulse 1.2 every 4th", [1.2 if i % 4 == 0 else 0.2 for i in range(N)]),
("pulse 2.2 / 0.2", [2.2 if i % 2 == 0 else 0.2 for i in range(N)]),
)
if __name__ == "__main__":
print(" surprise of a 10x claim cut to 1.35x (log scale beliefs):")
print(" KL = {:.2f} bits".format(
kl_normal_bits(log(10), 0.5, log(1.35), 0.15)))
print(" schedule total bits completion")
for name, s in SCHEDULES:
print(" {:<20} {:10.1f} {:10.4f}".format(
name, math.fsum(s), completion(s)))
best = max((completion([d / 10] * N), d / 10) for d in range(1, 31))
print(" best steady dose {:.1f} bit a section, completion {:.4f}"
.format(best[1], best[0]))Single source and citation
Fan, Y. (2026). Computational Bibliometrics, Falsification-First Rhetoric and Self-Verifying Monograph Compilers (Version 1.0.0), Chapter 2: Surprise, Anchors and Completion. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-101 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026101,
author = {Fan, Yafu},
title = {Computational Bibliometrics, Falsification-First Rhetoric and Self-Verifying Monograph Compilers},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Two Survival Laws: Why Most Books Fade and a Few Keep Being Read
- Chapter 3 · Falsify, Then Bound: The Bayesian Case and Its Limits
- Chapter 4 · The Trust Ratchet Turns Both Ways
- Chapter 5 · Proofreading Floors and Whitelist Gates
- Chapter 6 · The Self-Verifying Compiler: Code Points and the Whole Pipeline
- Chapter 7 · Liu Xie, Dai Zhen and Knuth: Old Rules for Checkable Writing
- Chapter 8 · Practice: Costs, the Long Tail and a Checklist