What does Maximum-Entropy Demand Reconstruction conclude, in numbers, about “East and West in the Classics: "Knowing That One Does Not Know" in Laozi 71 and Laplace's Philosophical Essay on Probabilities”?
Answer: Chapter 7 reads "knowing that one does not know" in Laozi 71 (Wang Bi and silk texts) and Laplace's principle of insufficient reason, measuring by divergence the pretended knowledge of distributions that contradict the known mean; for the uniform shortcut the discrepancy is 2.385 bits.
Scope of the numbers: The normal shortcut adds a symmetric shape and a standard deviation; under illustrative parameters, with a mean of 80 and a floor of 30, it puts 0.133 of its probability on impossible values, rising to 0.412 when the mean is 40. Accepting only the bounds and the mean, the maximum-entropy principle proposed by Jaynes in 1957 gives a truncated exponential distribution, with a 90th-percentile order of 146.0 for the illustrative dessert shop.
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: 2.385
| H(p*) = 7.080 bits | ||||
| assumed q | mean | H(p*)-H(q) | D(q||p*) | gap |
| b(2,8.8) | 80.00 | 0.251 | 0.251 | 0.000 |
| b(1.2,5.28) | 80.00 | 0.059 | 0.059 | 0.000 |
| two-hump | 80.00 | 0.371 | 0.371 | 0.000 |
| uniform[30,130] | 80.00 | 0.436 | 0.436 | 0.000 |
| normal(80,45) cut | 91.17 | -0.054 | 0.259 | 0.313 |
| uniform[30,300] | 165.00 | -0.997 | 1.387 | 2.385 |
Show the full program
# Chapter 7. p72: "knowing that one does not know", measured in bits.
# Model: order values on [30, 300] with a stated mean of 80
# (illustrative). For any assumed density q, the divergence
# D(q || p*) from the maximum-entropy answer p* counts the bits q claims
# beyond the stated facts. When q honours the same mean, D equals the
# entropy deficit H(p*) - H(q) exactly (the Pythagorean identity of the
# exponential family); when q breaks the mean, the two part ways and the
# gap flags a claim that contradicts what was said. Simpson rule, fsum.
import math
from statistics import NormalDist
A, B, M = 30.0, 300.0, 80.0
L = B - A
FR = (M - A) / L
def simpson(f, lo, hi, n=2000):
h = (hi - lo) / n
terms = [f(lo), f(hi)]
terms += [4.0 * f(lo + i * h) for i in range(1, n, 2)]
terms += [2.0 * f(lo + i * h) for i in range(2, n, 2)]
return math.fsum(terms) * h / 3.0
def integ(f, n=2000, hi=B):
# x = A + v * v removes the kink of densities that start at A
g = lambda v: f(A + v * v) * 2.0 * v
return simpson(g, 0.0, math.sqrt(hi - A), n)
def te_mean(lam):
u = lam * L
if abs(u) < 1e-8:
return A + L / 2.0
return A + 1.0 / lam - L / math.expm1(u)
def solve(m):
lo, hi = -2.0, 2.0
for _ in range(80):
mid = (lo + hi) / 2.0
if te_mean(mid) > m:
lo = mid
else:
hi = mid
return (lo + hi) / 2.0
def te_pdf(lam):
return lambda x: lam * math.exp(-lam * (x - A)) / -math.expm1(-lam * L)
def te_q(lam, p):
return A - math.log1p(p * math.expm1(-lam * L)) / lam
def beta_pdf(u, al, be):
if u <= 0.0 or u >= 1.0:
return 0.0
lg = math.lgamma(al + be) - math.lgamma(al) - math.lgamma(be)
return math.exp(lg + (al - 1) * math.log(u) + (be - 1) * math.log1p(-u))
def beta_x(al, be):
return lambda x: beta_pdf((x - A) / L, al, be) / L
F2 = (FR - 0.75 * 0.1) / 0.25
MIX = ((0.75, 4.0, 36.0), (0.25, 8.0, 8.0 * (1 - F2) / F2))
def mix_pdf(x):
return math.fsum(w * beta_x(a, b)(x) for w, a, b in MIX)
def truths():
lam = solve(M)
return [("max-ent", te_pdf(lam)),
("b(2,8.8)", beta_x(2.0, 8.8)),
("b(1.2,5.28)", beta_x(1.2, 5.28)),
("two-hump", mix_pdf)]
def ent(q, hi=B):
g = lambda x: -q(x) * math.log2(q(x)) if q(x) > 0.0 else 0.0
return integ(g, 4000, hi)
def kl(q, p, hi=B):
g = lambda x: q(x) * math.log2(q(x) / p(x)) if q(x) > 0.0 else 0.0
return integ(g, 4000, hi)
if __name__ == "__main__":
lam = solve(M)
ps = te_pdf(lam)
h0 = ent(ps)
nd = NormalDist(M, L / 6.0)
z = nd.cdf(B) - nd.cdf(A)
qs = [("b(2,8.8)", beta_x(2.0, 8.8), B),
("b(1.2,5.28)", beta_x(1.2, 5.28), B),
("two-hump", mix_pdf, B),
("uniform[30,130]", lambda x: 0.01, 130.0),
("normal(80,45) cut", lambda x: nd.pdf(x) / z, B),
("uniform[30,300]", lambda x: 1.0 / L, B)]
print("H(p*) = {:.3f} bits".format(h0))
print(" assumed q mean H(p*)-H(q) D(q||p*) gap")
for name, q, hi in qs:
mean = integ(lambda x: x * q(x), 4000, hi)
dh = h0 - ent(q, hi)
d = kl(q, ps, hi)
gap = d - dh if abs(d - dh) >= 5e-4 else 0.0
print(" {:<17} {:>7.2f} {:>11.3f} {:>8.3f} {:>6.3f}".format(
name, mean, dh, d, gap))Single source and citation
Fan, Y. (2026). The Maximum-Entropy Principle and Demand Reconstruction from Missing Data: the Least-Biased Order-Value Distribution Given Only a Mean and Bounds (Version 1.0.0), Chapter 7: East and West in the Classics: "Knowing That One Does Not Know" in Laozi 71 and Laplace's Philosophical Essay on Probabilities. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-301 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026301,
author = {Fan, Yafu},
title = {The Maximum-Entropy Principle and Demand Reconstruction from Missing Data: the Least-Biased Order-Value Distribution Given Only a Mean and Bounds},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Lagrange Multiplier of Maximum Entropy: the Truncated Exponential When Only a Mean and Bounds Are Known
- Chapter 2 · Discrete Maximum Entropy over Price Tiers: Wallis's Count, the Concentration Theorem and the Limits of Uniqueness
- Chapter 3 · The Cost of the Normal and Uniform Shortcuts: Quantiles, Log Loss and the Minimax
- Chapter 4 · Adding the Second Moment: the Truncated Normal Family, Convex Exponents and What One Standard Deviation Buys
- Chapter 5 · After the Sample Arrives: Plug-in Bias, the Second-Moment Trap and the Handover Point
- Chapter 6 · Stocking a New Product with the Newsvendor Model: Ordering at a Maximum-Entropy Quantile and Worst-Case Regret
- Chapter 8 · Closing the Loop: Cold-Start Demand for a New Product, the Maximum-Entropy Demand Reconstructor and a Pre-Registered Plan of Refutation