What does Maximum-Entropy Demand Reconstruction conclude, in numbers, about “Discrete Maximum Entropy over Price Tiers: Wallis's Count, the Concentration Theorem and the Limits of Uniqueness”?
Answer: Raising the average from 79 to 85 lifts the share at 149 and above from 0.1770 to 0.2100; lowering it to 73 cuts the share to 0.1438. A difference of six in the average shifts the large-order share by three to four percentage points, so the maximum-entropy answer is quite sensitive to the accuracy of the mean. Chapter 5 deals with the bias that arises when the mean itself comes from a small sample. Adding a tier at 399 moves the share at 149 and above from 0.1770 to 0.1695 even though the average is unchanged, and the lowest tier goes from 0.2672 to 0.2752; dropping the 299 tier moves the large-order share to 0.1931. The support is part of the constraints: which prices appear on the menu is itself information.
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: 0.1438, 0.1695, 0.1770, 0.1931, 0.2100, 0.2672
| case | P(29) | P(>=149) mean | H bits | |
| mean 79, seven tiers | 0.2672 | 0.1770 | 79.00 | 2.540 |
| mean 85, seven tiers | 0.2455 | 0.2100 | 85.00 | 2.610 |
| mean 73, seven tiers | 0.2923 | 0.1438 | 73.00 | 2.456 |
| mean 79, add a 399 tier | 0.2752 | 0.1695 | 79.00 | 2.553 |
| mean 79, drop the 299 tier | 0.2460 | 0.1931 | 79.00 | 2.495 |
| geometric mean 65 | 0.2994 | 0.2169 | 85.69 | 2.595 |
| geometric mean implied by the mean-79 answer: 63.34 | ||||
| geometric mean set to that | 0.3117 | 0.2049 | 83.29 | 2.566 |
Show the full program
# Chapter 2. p23: change the constraints and the "unique" answer changes.
# Model: the seven price tiers of p21 with an average of 79 (all
# illustrative). We re-solve the discrete maximum-entropy problem after
# changing one input at a time: the stated mean, the list of tiers, and
# the kind of average (arithmetic mean of price versus mean of log
# price, which turns exp(-lam x) into the power law x^(-lam)). The
# answer is unique only relative to the support and constraints chosen.
import math
BASE = [29.0, 49.0, 69.0, 99.0, 149.0, 199.0, 299.0]
def shares(xs, lam, feat):
f = [feat(x) for x in xs]
w = [math.exp(-lam * (v - f[0])) for v in f]
z = math.fsum(w)
return [v / z for v in w]
def solve(xs, target, feat):
lo, hi = -5.0, 5.0
for _ in range(120):
mid = (lo + hi) / 2.0
p = shares(xs, mid, feat)
m = math.fsum(a * feat(x) for a, x in zip(p, xs))
if m > target:
lo = mid
else:
hi = mid
return shares(xs, (lo + hi) / 2.0, feat)
def report(name, xs, p):
hi = math.fsum(a for a, x in zip(p, xs) if x >= 149.0)
mean = math.fsum(a * x for a, x in zip(p, xs))
h = -math.fsum(a * math.log2(a) for a in p if a > 0.0)
print(" {:<30} {:>6.4f} {:>6.4f} {:>6.2f} {:>5.3f}".format(
name, p[0], hi, mean, h))
if __name__ == "__main__":
ident = lambda x: x
print(" case P(29) P(>=149) mean H bits")
report("mean 79, seven tiers", BASE, solve(BASE, 79.0, ident))
report("mean 85, seven tiers", BASE, solve(BASE, 85.0, ident))
report("mean 73, seven tiers", BASE, solve(BASE, 73.0, ident))
more = BASE + [399.0]
report("mean 79, add a 399 tier", more, solve(more, 79.0, ident))
less = BASE[:-1]
report("mean 79, drop the 299 tier", less, solve(less, 79.0, ident))
p = solve(BASE, math.log(65.0), math.log)
report("geometric mean 65", BASE, p)
gm = math.exp(math.fsum(a * math.log(x)
for a, x in zip(solve(BASE, 79.0, ident), BASE)))
print("geometric mean implied by the mean-79 answer: {:.2f}".format(gm))
p = solve(BASE, math.log(gm), math.log)
report("geometric mean set to that", BASE, p)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 2: Discrete Maximum Entropy over Price Tiers: Wallis's Count, the Concentration Theorem and the Limits of Uniqueness. 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 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 7 · East and West in the Classics: "Knowing That One Does Not Know" in Laozi 71 and Laplace's Philosophical Essay on Probabilities
- Chapter 8 · Closing the Loop: Cold-Start Demand for a New Product, the Maximum-Entropy Demand Reconstructor and a Pre-Registered Plan of Refutation