Skip to contents

Checks P[M(A) in S] <= e^eps P[M(B) in S] and reports the epsilon that would be required.

Usage

morie_kamath_ch6_differential_privacy(M, A, B, S, epsilon)

Arguments

M

Function dataset -> named outcome distribution.

A, B

Neighbouring datasets.

S

Outcome set.

epsilon

Budget.

Value

List with estimate, satisfied, p_A, p_B, bound.

Examples

morie_kamath_ch6_differential_privacy(function(D) if (D == "A") c(s1 = 0.6,
    s2 = 0.4) else c(s1 = 0.4, s2 = 0.6), "A", "B", c("s1"),
    0.5)
#> $estimate
#> [1] 0.4054651
#> 
#> $epsilon_required
#> [1] 0.4054651
#> 
#> $satisfied
#> [1] TRUE
#> 
#> $p_A
#> [1] 0.6
#> 
#> $p_B
#> [1] 0.4
#> 
#> $ratio
#> [1] 1.5
#> 
#> $epsilon
#> [1] 0.5
#> 
#> $bound
#> [1] 0.6594885
#> 
#> $n
#> [1] 1
#> 
#> $method
#> [1] "differential privacy check (Kamath Eq 6.32)"
#>