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
Tmargin/visitorrevenue/visitorP(order)P(top-up)
017.66498.881.0000.000
5018.422100.380.9860.111
7520.067102.090.9460.194
10021.644101.740.8960.199
12522.61799.350.8500.160
15023.03296.070.8160.114
20023.02090.200.7770.049
30022.53384.890.7550.008
40022.33783.610.7510.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