Calculating Asymptotically Unbiased DP Two-Sided P-Value

pvalTwoSide(Z, size, theta, b, q)

Arguments

Z

A Binomial sample with Tulap noise

size

The number of trials in Binomial distribution (parameter n in Binomial(n, \(\theta\)))

theta

The success probability for each trial (parameter \(\theta\) in Binomial(n, \(\theta\)))

b

Discrete Laplace noise parameters, obtained by \(exp(-\epsilon)\)

q

The truncated quantiles

Value

A vector of asymptotically unbiased two-sided p-values

References

Awan, Jordan Alexander, and Aleksandra Slavkovic. 2020. "Differentially Private Inference for Binomial Data". Journal of Privacy and Confidentiality 10 (1). https://doi.org/10.29012/jpc.725.

See also

UMP one-sided p-values (pvalLeft and pvalRight)

Examples

set.seed(2020) sample <- rbinom(1, 10, 0.2) + rtulap(1, 0, 0.3, 0.05) pvalTwoSide(sample, size = 10, theta = 0.5,b = 0.3, q = 0.05)
#> [1] 0.2528762