What does Private-Message Patience, Handoff and Complaint Blocking conclude, in numbers, about “Red, Amber, Green: Cost-Sensitive Handoff Thresholds on the ROC Curve”?

Answer: Chapter 4 shows that red-amber-green thresholds must move with margin: a threshold fixed at the midpoint costs 1232.9 yuan on expensive goods where the optimum costs 550.2.

Scope of the numbers: Its parameters are illustrative; all calculations are generated by its programs; it is not personalised legal, financial or business advice. Marked boxes separate published evidence, runnable Python calculations (18 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: 1232.9, 550.2

AUC = 0.856 (d' = 1.5)
margint*to humanbad caughtgood sentcost/100at t=0.75
400.290.2130.6130.113195.9217.6
1501.170.4720.8790.370382.4417.0
6002.090.7750.9820.723550.21232.9
24003.020.9480.9990.935623.14496.3
the threshold moves with the margin; one global cutoff cannot
be optimal for both a 40-yuan and a 2400-yuan order
Show the full program
# Chapter 4. p41: a cost-sensitive handoff threshold on the ROC curve.
# Model (illustrative parameters): the AI reports a confidence score s.
# On chats it can carry ("good") s ~ N(DP, 1); on chats it will fumble
# ("bad") s ~ N(0, 1); a share P_BAD are bad.  Rule: hand to a human
# when s < t.  A missed bad chat costs LOSS x margin (lost order plus
# complaint risk); a needless handoff costs C yuan of human time.
# The optimum sets the ROC slope to P(good) C / (P(bad) LOSS V), so
#   t* = DP / 2 - ln(P(good) C / (P(bad) LOSS V)) / DP.
# The fixed rule "t = DP / 2" (best plain accuracy at equal shares) is
# shown for comparison.  Costs are per 100 chats.
import math
from statistics import NormalDist

ND = NormalDist()
DP, P_BAD, LOSS, C = 1.5, 0.2, 0.4, 8.0
P_GOOD = 1.0 - P_BAD


def cost(t, v):
    miss = P_BAD * (1.0 - ND.cdf(t)) * LOSS * v
    waste = P_GOOD * ND.cdf(t - DP) * C
    return 100.0 * (miss + waste)


print("AUC = {:.3f} (d' = {})".format(ND.cdf(DP / math.sqrt(2.0)), DP))
print(" margin   t*    to human  bad caught  good sent  cost/100"
      "  at t=0.75")
for v in (40, 150, 600, 2400):
    k = P_GOOD * C / (P_BAD * LOSS * v)
    t = DP / 2.0 - math.log(k) / DP
    red = P_BAD * ND.cdf(t) + P_GOOD * ND.cdf(t - DP)
    print("{:7d}  {:5.2f}  {:8.3f}  {:10.3f}  {:9.3f}  {:8.1f}  {:9.1f}"
          .format(v, t, red, ND.cdf(t), ND.cdf(t - DP), cost(t, v),
                  cost(0.75, v)))
print("the threshold moves with the margin; one global cutoff cannot")
print("be optimal for both a 40-yuan and a 2400-yuan order")

Single source and citation

Fan, Y. (2026). Patience-Decay Distributions in Private-Message Queues, Red-Amber-Green Human-AI Handoff Thresholds and Markov Blocking of Complaint Escalation (Version 1.0.0), Chapter 4: Red, Amber, Green: Cost-Sensitive Handoff Thresholds on the ROC Curve. 5D Library. DOI pending

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

BibTeX
@book{fan2026175,
  author    = {Fan, Yafu},
  title     = {Patience-Decay Distributions in Private-Message Queues, Red-Amber-Green Human-AI Handoff Thresholds and Markov Blocking of Complaint Escalation},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book