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
| field | agree | disagree | ||
| amount | 6.600 | -5.044 | ||
| digits | 16.610 | never | ||
| nickname | 9.451 | -1.736 | ||
| time | 2.375 | -2.623 | ||
| amount | time | identity | weight | P(match) |
| yes | yes | digits agree | 17.948 | 1.00000 |
| yes | yes | nickname agrees | 10.790 | 0.99944 |
| yes | yes | none shown | 1.339 | 0.71663 |
| yes | no | digits agree | 12.950 | 0.99987 |
| yes | no | nickname agrees | 5.792 | 0.98227 |
| yes | no | none shown | -3.659 | 0.07334 |
| no | yes | digits agree | 6.304 | 0.98750 |
| no | yes | nickname agrees | -0.855 | 0.35610 |
| no | yes | none shown | -10.306 | 0.00079 |
| no | no | digits agree | 1.306 | 0.71201 |
| no | no | nickname agrees | -5.853 | 0.01701 |
| no | no | none shown | -15.304 | 0.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
- Chapter 1 · Locks on a Live Shelf: How Long to Hold a Piece
- Chapter 2 · The Cascade in Closed Form, and Who Goes First
- Chapter 3 · The Same Five Digits Twice: Collisions, Masks and Offsets
- Chapter 4 · Matching Rows to Orders: Likelihoods and the Hungarian Method
- Chapter 5 · A Hybrid Recommender: Taste in Shapes and Colours People Name
- Chapter 6 · Waking the Pool: Blasts, Targets and the Right Day
- Chapter 8 · Practice: One Year of Live Sessions and One Test Protocol