What does Reactivation, Thresholds and Flash Clearance conclude, in numbers, about “Free-Shipping Thresholds: Piecewise Expected Margin and the Revenue Trap”?
Answer: A free-shipping threshold is a price: customers on either side of it face different total prices. The piecewise expected margin shows that the revenue-best threshold sits close to the median basket while the margin-best threshold lies well above it; under illustrative parameters the first is RM 83 and the second RM 170. The higher the margin on added items and the lower the shipping cost, the lower the best threshold. Under illustrative parameters, free shipping on everything always loses to never shipping free. An exact check with fractions on the empirical distribution prevents rounding from reversing the ranking and removes the need for a distributional assumption.
Scope of the numbers: Parameters are illustrative and correspond to no real customer, order or supplier of HOMIE-X, every price in the book is illustrative, and all calculations are generated by the book's programs. This is general business analysis, not personalised business, tax or legal advice.
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: 170, 83
| mean intended basket RM 98.88; median RM 85.00 | ||||
| T | margin/visitor | revenue/visitor | P(order) | P(top-up) |
| 0 | 17.664 | 98.88 | 1.000 | 0.000 |
| 50 | 18.422 | 100.38 | 0.986 | 0.111 |
| 75 | 20.067 | 102.09 | 0.946 | 0.194 |
| 100 | 21.644 | 101.74 | 0.896 | 0.199 |
| 125 | 22.617 | 99.35 | 0.850 | 0.160 |
| 150 | 23.032 | 96.07 | 0.816 | 0.114 |
| 200 | 23.020 | 90.20 | 0.777 | 0.049 |
| 300 | 22.533 | 84.89 | 0.755 | 0.008 |
| 400 | 22.337 | 83.61 | 0.751 | 0.001 |
| margin-best T = RM 170: margin 23.109, revenue 93.47 | ||||
| revenue-best T = RM 83: margin 20.621, revenue 102.25 | ||||
| margin given up by the revenue-best T: 2.488 per visitor | ||||
| rule of thumb T = 1.1 x mean basket = RM 109: margin 22.068 |
Show the full program
# Chapter 4. p41: expected gross margin per visitor against the free-
# shipping threshold T. Illustrative parameters, not a shop's data:
# intended basket B ~ lognormal, median RM 85, log-sd 0.55
# item margin rate MU 0.30; shipping cost to the shop S = RM 12
# below T the buyer is charged F = RM 12, and then either
# tops up with filler worth (T - B) + 4 with chance exp(-(T-B)/25),
# filler margin rate MUF 0.15 (accessories, tail stock), or
# orders as she is (paying F) with chance 1 - ALPHA, ALPHA = 0.25
# at or above T she orders B and the shop pays S.
# Expectation by quadrature over z (standard normal) on a fine grid.
import math
MED, SD, MU, MUF, S, F, ALPHA, DELTA, OVER = (
85.0, 0.55, 0.30, 0.15, 12.0, 12.0, 0.25, 25.0, 4.0)
Z = [i / 200.0 for i in range(-1200, 1201)]
WZ = [math.exp(-z * z / 2.0) / math.sqrt(2.0 * math.pi) / 200.0 for z in Z]
BASKETS = [MED * math.exp(SD * z) for z in Z]
def outcome(b, t, mu=MU, muf=MUF, ship=S):
"""(margin, revenue, P(order), P(top-up)) for one intended basket."""
if b >= t:
return mu * b - ship, b, 1.0, 0.0
d = t - b
tau = math.exp(-d / DELTA)
stay = (1.0 - tau) * (1.0 - ALPHA)
m = tau * (mu * b + muf * (d + OVER) - ship) + stay * (mu * b + F - ship)
rev = tau * (b + d + OVER) + stay * (b + F)
return m, rev, tau + stay, tau
def expect(t, **kw):
cols = [[], [], [], []]
for w, b in zip(WZ, BASKETS):
for j, v in enumerate(outcome(b, t, **kw)):
cols[j].append(w * v)
return [math.fsum(c) for c in cols]
def best_t(**kw):
grid = [float(t) for t in range(0, 401)]
return max(grid, key=lambda t: expect(t, **kw)[0])
if __name__ == "__main__":
mean_b = math.fsum(w * b for w, b in zip(WZ, BASKETS))
print("mean intended basket RM {:.2f}; median RM {:.2f}".format(
mean_b, MED))
print(" T margin/visitor revenue/visitor P(order) P(top-up)")
for t in (0, 50, 75, 100, 125, 150, 200, 300, 400):
m, r, po, pt = expect(float(t))
print("{:>5} {:7.3f} {:7.2f} {:.3f} {:.3f}"
.format(t, m, r, po, pt))
tm = best_t()
grid = [float(t) for t in range(0, 401)]
tr = max(grid, key=lambda t: expect(t)[1])
print("margin-best T = RM {:.0f}: margin {:.3f}, revenue {:.2f}".format(
tm, expect(tm)[0], expect(tm)[1]))
print("revenue-best T = RM {:.0f}: margin {:.3f}, revenue {:.2f}".format(
tr, expect(tr)[0], expect(tr)[1]))
print("margin given up by the revenue-best T: {:.3f} per visitor"
.format(expect(tm)[0] - expect(tr)[0]))
t_aov = round(mean_b * 1.1)
print("rule of thumb T = 1.1 x mean basket = RM {}: margin {:.3f}".format(
t_aov, expect(float(t_aov))[0]))Single source and citation
Fan, Y. (2026). Repeat-Buyer Reactivation in Private-Channel Commerce, Threshold Bundle Margin Design and Flash-Clearance Dynamics (Version 1.0.0), Chapter 4: Free-Shipping Thresholds: Piecewise Expected Margin and the Revenue Trap. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-353 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026353,
author = {Fan, Yafu},
title = {Repeat-Buyer Reactivation in Private-Channel Commerce, Threshold Bundle Margin Design and Flash-Clearance Dynamics},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Survival Curves of Purchase Gaps: Censoring, Kaplan–Meier and the Misreading of Dormancy
- Chapter 2 · Buy-Till-You-Die: the Probability of Being Alive and Next Quarter's Expected Orders
- Chapter 3 · The Incremental Ledger of a Reactivation Coupon: Survival, Leakage to Sure Returners and the Coupon Band
- Chapter 5 · Margin Design of Spend-and-Save Ladders: Where the Savings Leak
- Chapter 6 · Clearing Tail Stock: Finite-Horizon Pricing, Two-Hour Pulses and Regulars Who Wait
- Chapter 7 · Ji Ran and Dupuit: the Reversal of Dear and Cheap and Tiered Tolls in the Classical Sources
- Chapter 8 · The Empirical Loop: the Regulars' Ledger and the Pricing and Closing Tool Specification