What does Differential Privacy for Business Statistics conclude, in numbers, about “Sensitivity: Clip Revenue First, and Spend the Budget Once on a Customer Profile”?

Answer: Chapter 3 deals with sensitivity: revenue clipped per person has a root mean square error of 6545 yuan in the illustrative data, 4.09 % of revenue, and a customer profile spends the budget only once by parallel composition.

Scope of the numbers: Chapter 3 deals with sensitivity: revenue clipped per person has a root mean square error of 6545 yuan in the illustrative data, 4.09 % of revenue, and a customer profile spends the budget only once by parallel composition. Marked boxes separate published evidence, runnable Python calculations (20 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: 4.09, 6545

true monthly revenue 159869 yuan from 400 customers, eps = 0.5
Cclippedbiasnoise sdRMSERMSE %
2500.560789717077897449.40
5000.2424177514144179926.15
7500.1102565221212573916.10
10000.0681684528281708010.68
15000.0307505424386215.39
20000.0133292565765454.09
30000.005970848585415.34
50000.000014142141428.85
100000.0000282842828417.69
best of the grid: C = 2000, RMSE 6545 yuan
spend quantiles: p50 278p90 789p99 2086max 3623
if one customer may add up to 6 orders, order-level clipping
at C = 2000 needs noise sd 33941, not 5657
Show the full program
# Chapter 3. p31: choosing the clipping bound C for a revenue total.
# One customer can change an unclipped revenue sum by any amount, so its
# sensitivity is unbounded. Clip each customer's monthly spend at C: the
# sensitivity becomes C, the noise sd is sqrt(2) * C / eps, and the price
# is a bias, the spend above C that is cut away. Root mean square error
# = sqrt(bias**2 + 2 * C**2 / eps**2). 400 customers with log-normal
# spend (median 300 yuan, sigma 0.9; illustrative), eps = 0.5.
import math
import random

rng = random.Random(20261113)
spend = [math.exp(rng.gauss(math.log(300.0), 0.9)) for _ in range(400)]
total = math.fsum(spend)
EPS = 0.5
print("true monthly revenue %.0f yuan from %d customers, eps = %.1f"
      % (total, len(spend), EPS))
print("%6s %8s %10s %10s %10s %8s"
      % ("C", "clipped", "bias", "noise sd", "RMSE", "RMSE %"))
best = None
for c in (250, 500, 750, 1000, 1500, 2000, 3000, 5000, 10000):
    cut = math.fsum(max(0.0, x - c) for x in spend)
    share = len([x for x in spend if x > c]) / len(spend)
    sd = math.sqrt(2.0) * c / EPS
    rmse = math.sqrt(cut * cut + sd * sd)
    if best is None or rmse < best[1]:
        best = (c, rmse)
    print("%6d %8.3f %10.0f %10.0f %10.0f %8.2f"
          % (c, share, cut, sd, rmse, 100.0 * rmse / total))
print("best of the grid: C = %d, RMSE %.0f yuan" % best)
q = sorted(spend)
print("spend quantiles: p50 %.0f  p90 %.0f  p99 %.0f  max %.0f"
      % (q[199], q[359], q[395], q[-1]))
# a customer with k orders counted as k rows has sensitivity k * C
print("if one customer may add up to 6 orders, order-level clipping")
print("at C = %d needs noise sd %.0f, not %.0f"
      % (best[0], 6 * math.sqrt(2.0) * best[0] / EPS,
         math.sqrt(2.0) * best[0] / EPS))

Single source and citation

Fan, Y. (2026). Differential Privacy, the Laplace Mechanism and Privacy-Budget Accounting: Publishing Business Statistics without Exposing Any Individual (Version 1.0.0), Chapter 3: Sensitivity: Clip Revenue First, and Spend the Budget Once on a Customer Profile. 5D Library. DOI pending

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

BibTeX
@book{fan2026296,
  author    = {Fan, Yafu},
  title     = {Differential Privacy, the Laplace Mechanism and Privacy-Budget Accounting: Publishing Business Statistics without Exposing Any Individual},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book