What does Bumps, Upsells and Cross-Sells conclude, in numbers, about “Learning the Bump Price Online, and Simpson's Paradox”?
Answer: Chapter 6 uses Thompson sampling to cut the loss of a price test from RM 48,005 to RM 1,831 and shows Simpson's paradox in comparing recommendations.
Scope of the numbers: Valuation distributions, acceptance and refund rates and the needs structure of 30 sites are illustrative or synthetic; all data are generated by its programs; the book is not legal advice. Chapter 3 routes each of 30 synthetic sites to its top two by conditional mutual information and finds that even with 60,000 users only 14 to 17 sites have stable top twos.
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: 1831, 48005
| bump RM | 19: take 0.854, per order 16.22 |
| bump RM | 29: take 0.700, per order 20.30 |
| bump RM | 44: take 0.501, per order 22.05 |
| bump RM | 69: take 0.288, per order 19.86 |
| split | revenue RM 392,991; regret RM 48,005 |
| thompson revenue RM 439,165; regret RM 1,831 |
Show the full program
# Chapter 6. p11: Choosing a bump price by Thompson sampling.
# Four candidate bump prices with true take rates from p01's model at
# zero friction. Revenue per order = price x take. Over 20,000 orders we
# compare an even split (A/B/C/D test, then nothing learned until the
# end) with Thompson sampling on Beta posteriors of take, choosing the
# price with the highest sampled revenue. Regret = revenue lost against
# always using the best price.
import random
from math import log, erf, sqrt
def take(p, med=0.45, sd=0.8):
return 0.5 * (1 - erf((log(p / 98) - log(med)) / sd / sqrt(2)))
PRICES = (19.0, 29.0, 44.0, 69.0)
def run(policy, n=20000, seed=78011):
rng = random.Random(seed)
a = [1.0] * 4
b = [1.0] * 4
rev = 0.0
for t in range(n):
if policy == "split":
k = t % 4
else:
k = max(range(4), key=lambda i: PRICES[i] * rng.betavariate(
a[i], b[i]))
if rng.random() < take(PRICES[k]):
rev += PRICES[k]
a[k] += 1
else:
b[k] += 1
return rev
if __name__ == "__main__":
for p in PRICES:
print(" bump RM {:4.0f}: take {:.3f}, per order {:.2f}".format(
p, take(p), p * take(p)))
best = max(p * take(p) for p in PRICES) * 20000
for pol in ("split", "thompson"):
r = run(pol)
print(" {:8s} revenue RM {:,.0f}; regret RM {:,.0f}".format(
pol, r, best - r))Single source and citation
Fan, Y. (2026). Order-Bump Friction Elasticity, One-Click Upsell Kinetics and Cross-Domain Recommendation Matrices (Version 1.0.0), Chapter 6: Learning the Bump Price Online, and Simpson's Paradox. 5D Library. https://doi.org/10.5281/zenodo.24090207
DOI: 10.5281/zenodo.24090207 · Read the monograph · 5DL-B-078 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026078,
author = {Fan, Yafu},
title = {Order-Bump Friction Elasticity, One-Click Upsell Kinetics and Cross-Domain Recommendation Matrices},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090207},
url = {https://doi.org/10.5281/zenodo.24090207}
}Other chapter answers in this book
- Chapter 1 · The Zero-Friction Arbitrage of the Order Bump
- Chapter 2 · Second 1 and Day 7: the Two Peaks of the Upsell
- Chapter 3 · Cross-Fleet Routing by Conditional Mutual Information
- Chapter 4 · Order-Value Multipliers and Bundle Pricing
- Chapter 5 · The Cost of Consent and the Number of Recommendations
- Chapter 7 · The Shiji on Money-Makers and the Guoyu on Mother and Child Coins
- Chapter 8 · Incremental Revenue, Guardrails and a Pre-Registered Holdout Experiment