Skip to contents

The alpha and 1-alpha quantiles, each spending half the budget through morie_dp_quantile.

Usage

morie_dp_minmax(x, epsilon = 1, a = NULL, b = NULL, alpha = 0.01, seed = NULL)

Arguments

x

values.

epsilon

total budget, split evenly between the two quantiles.

a, b

bounds, as for morie_dp_quantile.

alpha

tail fraction, in (0, 0.5).

seed

optional integer seed.

Value

list with lower, upper, epsilon_each, true_min, true_max.

Details

There is no private minimum or maximum. Each extreme is determined by exactly one record, so releasing it releases that record. This function returns inner quantiles and says so in warnings; treating them as the range is the error it exists to prevent.

References

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

Examples

set.seed(1)
r <- morie_dp_minmax(rnorm(500), epsilon = 2, a = -4, b = 4)
r$lower < r$upper
#> [1] TRUE