What does Live Locks, Bank Matching and Styling CRM conclude, in numbers, about “Permits, Secret Codes and Record Linkage”?

Answer: Chapter 7 reads the permits of the Song maritime trade offices, the secret codes of the Rishengchang draft bank and Fellegi and Sunter's theory of record linkage: a row agreeing only in amount and time reaches a posterior of only 0.71663.

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.71663

fieldagreedisagree
amount6.600-5.044
digits16.610never
nickname9.451-1.736
time2.375-2.623
amounttimeidentityweightP(match)
yesyesdigits agree17.9481.00000
yesyesnickname agrees10.7900.99944
yesyesnone shown1.3390.71663
yesnodigits agree12.9500.99987
yesnonickname agrees5.7920.98227
yesnonone shown-3.6590.07334
noyesdigits agree6.3040.98750
noyesnickname agrees-0.8550.35610
noyesnone shown-10.3060.00079
nonodigits agree1.3060.71201
nononickname agrees-5.8530.01701
nononone shown-15.3040.00002
Show the full program
# Chapter 7. p14: Fellegi and Sunter's weights for a bank row and an
# order. For each field, m is the chance it agrees when the pair is a
# true match and u the chance it agrees by accident: amount with an
# offset 0..99 (m 0.97, u 0.01), last five digits when shown (1.0,
# 0.00001), a nickname in the note (0.70, 0.001) and a transfer within
# 30 minutes of the order (0.8647 for a mean delay of 15 minutes,
# 30 / 180 by chance). Agreement adds log2(m / u), disagreement adds
# log2((1 - m) / (1 - u)). With prior odds 1 : 199 that a given order
# is the one, we print each field's weights and, for every pattern of
# the amount, the time and one identity field, the posterior chance
# of a true match. No sampling.
import itertools
import math

FIELDS = (("amount", 0.97, 0.01), ("digits", 1.0, 0.00001),
          ("nickname", 0.70, 0.001), ("time", 0.8647, 30 / 180))

def w(m, u, agree):
    if agree:
        return math.log2(m / u)
    return -math.inf if m == 1.0 else math.log2((1 - m) / (1 - u))

if __name__ == "__main__":
    print("     field      agree    disagree")
    for name, m, u in FIELDS:
        d = w(m, u, False)
        ds = "  never" if d == -math.inf else "{:8.3f}".format(d)
        print("     {:9s}  {:6.3f}   {}".format(name, w(m, u, True), ds))
    prior = math.log2(1 / 199)
    print("     amount  time   identity          weight   P(match)")
    f = {n: (m, u) for n, m, u in FIELDS}
    for a, t in itertools.product((True, False), repeat=2):
        for ident in ("digits agree", "nickname agrees", "none shown"):
            tot = prior + w(*f["amount"], a) + w(*f["time"], t)
            if ident == "digits agree":
                tot += w(*f["digits"], True)
            elif ident == "nickname agrees":
                tot += w(*f["nickname"], True)
            p = 1 / (1 + 2 ** (-tot))
            print("     {:6s}  {:5s}  {:15s}  {:8.3f}   {:.5f}".format(
                "yes" if a else "no", "yes" if t else "no", ident, tot, p))

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 7: Permits, Secret Codes and Record Linkage. 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