Skip to contents

Adds Laplace(0, \(\Delta_1/\epsilon\)) noise, where \(\Delta_1\) is the L1 sensitivity of the query.

Usage

morie_dp_laplace_mechanism(y, sensitivity = 1, epsilon = 1, seed = NULL)

Arguments

y

the true query answer; scalar or vector.

sensitivity

L1 sensitivity of the query, positive.

epsilon

privacy budget, positive.

seed

optional integer seed.

Value

list with release, noise_scale, noise_sd (\(\sqrt{2}b\)), epsilon, sensitivity.

Details

Sensitivity is a property of the QUERY, never of the data in hand. Estimating it from the dataset is itself a non-private query, and a sensitivity that is too small does not degrade the guarantee – it voids it.

References

Dwork, C., McSherry, F., Nissim, K. and Smith, A. (2006). Calibrating noise to sensitivity in private data analysis. TCC, 265-284.

Examples

morie_dp_laplace_mechanism(42,
  sensitivity = 1, epsilon = 0.5,
  seed = 1
)$noise_scale
#> [1] 2