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 | |||||
| C | clipped | bias | noise sd | RMSE | RMSE % |
| 250 | 0.560 | 78971 | 707 | 78974 | 49.40 |
| 500 | 0.242 | 41775 | 1414 | 41799 | 26.15 |
| 750 | 0.110 | 25652 | 2121 | 25739 | 16.10 |
| 1000 | 0.068 | 16845 | 2828 | 17080 | 10.68 |
| 1500 | 0.030 | 7505 | 4243 | 8621 | 5.39 |
| 2000 | 0.013 | 3292 | 5657 | 6545 | 4.09 |
| 3000 | 0.005 | 970 | 8485 | 8541 | 5.34 |
| 5000 | 0.000 | 0 | 14142 | 14142 | 8.85 |
| 10000 | 0.000 | 0 | 28284 | 28284 | 17.69 |
| best of the grid: C = 2000, RMSE 6545 yuan | |||||
| spend quantiles: p50 278 | p90 789 | p99 2086 | max 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
- Chapter 1 · "Anonymous" Is Not Anonymous: Quasi-Identifiers, Differencing and Reconstruction
- Chapter 2 · The Laplace Mechanism: Epsilon Is a Ceiling on the Likelihood Ratio
- Chapter 4 · Composition and Budget Accounting: Basic, Advanced and Optimal Books
- Chapter 5 · Randomized Response and the Local Model: Letting Customers Add the Noise
- Chapter 6 · How Large Should Epsilon Be: the Dispute over the 2020 United States Census and the Price of Small Numbers
- Chapter 7 · Classical Sources East and West: Han Feizi on the Difficulty of Persuasion and Warner's Randomized Response
- Chapter 8 · A Noisy Release Procedure for the Public Statistics of a Pay-per-Use Service, and a Plan for Refutation