What does Live Locks, Bank Matching and Styling CRM conclude, in numbers, about “Locks on a Live Shelf: How Long to Hold a Piece”?

Answer: Chapter 1 shows that with two-hour locks only 0.7465 of pieces are paid for during the session, against 0.9899 with 10-minute locks, and that with a long queue buying on the lock leaves 0.0010 unpaid while waiting 15 minutes loses 0.1730 to walk-ins.

Scope of the numbers: Its customers, delays, rates and parameters are illustrative models; all calculations are generated by its programs; the book is not legal, financial, banking or data-protection advice. Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's hypotheses.

中文版

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.7465, 0.9899, 10, 15

tau (min)paid by Lmean timemean passes
50.955628.25.68
100.989925.42.10
150.989625.31.27
300.977527.30.61
600.918328.80.37
1200.746518.20.25
Show the full program
# Chapter 1. p01: One scarce piece, a queue of claimants and a payment
# clock. During a live session at a boutique abroad, claimants for one
# piece form a queue in the order they called. The head of the queue
# holds a lock for tau minutes; if she has not paid by then, the lock
# passes to the next. A claimant pays with chance 0.75; a payer's delay
# is lognormal with median 12 minutes (spread 1.0). The buyer must
# decide in the store within L = 120 minutes. We print, for each tau,
# the chance the piece is paid for by L, the mean time to payment and
# the mean number of lock passes; 20000 sessions each. Seed 112.
import math
import random

PAY, MED, SPREAD, L, QUEUE = 0.75, 12.0, 1.0, 120.0, 20

def session(rng, tau):
    t, passes = 0.0, 0
    for _ in range(QUEUE):
        if rng.random() < PAY:
            d = rng.lognormvariate(math.log(MED), SPREAD)
            if d <= tau:
                return t + d, passes
        t += tau
        passes += 1
        if t >= L:
            return None, passes
    return None, passes

if __name__ == "__main__":
    print("     tau (min)   paid by L   mean time   mean passes")
    for tau in (5, 10, 15, 30, 60, 120):
        rng = random.Random(112)
        hit, times, ps = 0, [], []
        for _ in range(20000):
            t, p = session(rng, tau)
            ps.append(p)
            if t is not None and t <= L:
                hit += 1
                times.append(t)
        print("     {:9d}   {:9.4f}   {:9.1f}   {:11.2f}".format(
            tau, hit / 20000, math.fsum(times) / len(times),
            math.fsum(ps) / len(ps)))

Single source and citation

Fan, Y. (2026). Live-Shopping Flash Inventory Locks, Bayesian Bank-Feed Reconciliation and Personalized Styling CRM (Version 1.0.0), Chapter 1: Locks on a Live Shelf: How Long to Hold a Piece. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-112 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026112,
  author    = {Fan, Yafu},
  title     = {Live-Shopping Flash Inventory Locks, Bayesian Bank-Feed Reconciliation and Personalized Styling CRM},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book