DP Population Proportion Test

dpPropTest(Z, size, theta, b, q, alternative, alpha)

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

alternative

The type of alternative hypothesis, must be "two.sided", "less", or "greater"

alpha

The confidence level of the confidence interval

Value

A table summary of the sample estimate, the p-value of the test, and the confidence interval of \(\theta\)

Examples

dpPropTest(9, 30, 0.5, exp(-1), 0.05, "less", 0.05)
#> Ha: True theta less than 0.5 #> Data 9.00000000 #> Size 30.00000000 #> Sample Estimates 0.30000000 #> p-value 0.02069401 #> Lower Limit 0.00000000 #> Upper Limit 0.46070737