Learn R Programming

GenBinomApps (version 1.2.1)

n.clopper.pearson: Required Sample Size

Description

Provides the required sample size with respect to the one-sided upper Clopper-Pearson limit.

Usage

n.clopper.pearson(k, p, alpha = 0.1, uniroot.lower = k + 1, uniroot.upper = 1e+100, 
uniroot.maxiter = 1e+05, uniroot.tol = 1e-10)

Value

The value for the required sample size.

Arguments

k

number of failures.

p

target probability.

alpha

significance level for the \((1-\alpha)\cdot 100\)% confidence level (default \(\alpha=0.1\)).

uniroot.lower

The value of the lower parameter sent to uniroot. Lower bound of the interval to be searched. See uniroot for more details.

uniroot.upper

The value of the upper parameter sent to uniroot. Upper bound of the interval to be searched. See uniroot for more details.

uniroot.maxiter

The value of the maxiter parameter sent to uniroot. Maximum number of iterations. See uniroot for more details.

uniroot.tol

The value of the tol parameter sent to uniroot. Convergence tolerance. See uniroot for more details.

Details

Provides the required sample size with respect to the upper Clopper-Pearson limit for a given target failure probability at a certain confidence level.

References

D.Kurz, H.Lewitschnig, J.Pilz, Decision-Theoretical Model for Failures which are Tackled by Countermeasures, IEEE Transactions on Reliability, Vol. 63, No. 2, June 2014.

See Also

uniroot,clopper.pearson.ci

Examples

Run this code
## target failure probability p=0.0002, 8 failures
n.clopper.pearson(8,0.0002)
# 64972

Run the code above in your browser using DataLab