Build confidence intervals for binomial proportions using the Feldman-Cousins construction (Feldman and Cousins, 1998).

confint_binom(n, N, cl = 0.95, acc = 0.001)

Arguments

n

number of successes. Numeric vector of length one.

N

number of trials. Numeric vector of length one.

cl

confidence level for the returned confidence interval. A number between zero and one.

acc

required accuracy in the confidence interval endpoints. A positive number.

Value

a numeric vector of length two, containing the confidence interval endpoints.

Details

More details on the Feldman-Cousins construction can be found in the documentation page of confint_pois.

References

Feldman, Gary J. and Cousins, Robert D. "Unified approach to the classical statistical analysis of small signals" Phys. Rev. D 57, issue 7 (1998): 3873-3889.

See also

Examples

confint_binom(50, 100, cl = 0.95, acc = 1e-3)
#> [1] 0.399 0.601
#> attr(,"cl")
#> [1] 0.95