Skip to contents

morie_dp_quantile at q = 0.5. Kept separate because the median is the case where the naive approach fails most clearly: its global sensitivity is the entire domain, so noise addition is not an option and rank selection is the only route.

Usage

morie_dp_median(x, epsilon = 1, a = NULL, b = NULL, seed = NULL)

Arguments

x

values.

epsilon

privacy budget.

a, b

bounds. Taken from the data when NULL, which is itself a non-private query – the function warns.

seed

optional integer seed.

Value

list with release, true_median, interval, bounds.

References

Smith, A. (2011). STOC, 813-822.

Examples

set.seed(1)
round(morie_dp_median(rnorm(500), epsilon = 2, a = -4, b = 4)$release, 2)
#> [1] -0.03