Releases an \((\epsilon, \delta)\)-DP mean of a bounded numeric vector,
as a noised sum over a noised count, each with half the budget. Under the
add-or-remove-one relation every mechanism here uses, one record moves
the clipped sum by at most max(abs(lower), abs(upper)) and the
count by 1, so neither the sum nor length(x) is treated as public.
Arguments
- x
Numeric vector (no NAs).
- lower, upper
Hard bounds on
x. Values outside are clipped (with a warning); the bounds must be chosen without looking at the data.- epsilon, delta
Privacy parameters for the whole release.
deltashould be well below1 / length(x).- budget
Optional
dpbudget()to charge against.
Details
Each half is calibrated with the analytic Gaussian mechanism (Balle and
Wang 2018), which holds for every \(\epsilon > 0\); the classical
bound \(\sigma = \Delta \sqrt{2 \ln(1.25/\delta)}/\epsilon\) holds only
for \(\epsilon \le 1\) and is not used. Noise comes from the operating
system's CSPRNG; set.seed() has no effect.
