umpuApprox: Asymptotically Unbiased Two-Sided DP-UMP Tests

Description Usage Arguments Value References See Also Examples

View source: R/umpuApprox.R

Description

Asymptotically Unbiased Two-Sided DP-UMP Tests

Usage

1
umpuApprox(theta, size, alpha, epsilon, delta)

Arguments

theta

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

size

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

alpha

Level of the tests

epsilon

Parameter ε in (ε, δ)-DP

delta

Parameter δ in (ε, δ)-DP

Value

A vector of asymptotically unbiased two-sided DP-UMP tests

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

Calculating simple and one-sided DP-UMP tests (umpLeft or umpRight) and unbiased two-sided DP-UMP tests (UMPU)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#Comparing unbiased DP-UMP tests obtained by umpuApprox and UMPU
asymp <- umpuApprox(theta = 0.4, size = 10, alpha = 0.05, epsilon = 1, delta = 0.01)
twoside <- UMPU(theta = 0.4, size = 10, alpha = 0.05, epsilon = 1, delta = 0.01)

#Plot the probability of rejecting the null hypothesis based on x
plot(asymp, type = "l", lwd = 1.5, col = "red", xlab = "x",
  ylab = "Phi (Probability of rejecting the null hypothesis)",
  main = "Unbiased DP-UMP Tests")
lines(twoside, type = "l", lwd = 1.5, lty = 2, col = "blue")
legend("topleft", legend=c("Asymptotically UMPU", "UMPU"),
  col=c("red", "blue"), lty=1:2, lwd = 1.5)

ttran2401/binomialDP documentation built on July 7, 2020, 1:18 a.m.