bintol.int {tolerance} | R Documentation |
Provides 1-sided or 2-sided tolerance intervals for binomial random variables. From a statistical quality control perspective, these limits use the proportion of defective (or acceptable) items in a sample to bound the number of defective (or acceptable) items in future productions of a specified quantity.
bintol.int(x, n, m, alpha = 0.05, P = 0.99, side = 1, method = c("LS", "WS", "AC", "JF", "CP", "AS", "LO"), a1 = 0.5, a2 = 0.5)
x |
The number of defective (or acceptable) units in the sample. |
n |
The size of the random sample of units selected for inspection. |
m |
The quantity produced in future groups. |
alpha |
The level chosen such that 1-alpha is the confidence level. |
P |
The proportion of the defective (or acceptable) units in future samples of size m
to be covered by this tolerance interval. |
side |
Whether a 1-sided or 2-sided tolerance interval is required (determined by side = 1 or side = 2 ,
respectively). |
method |
The method for calculating the lower and upper confidence bounds, which are used in the calculation
of the tolerance bounds. The default method is "LS" , which is the large-sample method. "AC" gives the Agresti-Coull method,
which is also appropriate when the sample size is large. "JF" is Jeffreys' method, which is a Bayesian approach
to the estimation. "CP" is the Clopper-Pearson method, which provides a more conservative interval. "AS" is
the arcsine method, which is appropriate when the sample proportion is not too close to 0 or 1. "LO" is the logit
method, which also is appropriate when the sample proportion is not too close to 0 or 1, but yields a more conservative interval.
More information on these methods can be found in the "References". |
a1 |
This specifies the first shape hyperparameter when using Jeffreys' method. |
a2 |
This specifies the second shape hyperparameter when using Jeffreys' method. |
bintol.int
returns a data frame with items:
alpha |
The specified significance level. |
P |
The proportion of defective (or acceptable) units in future samples of size m . |
p.hat |
The proportion of defective (or acceptable) units in the sample, calculated by x/n . |
1-sided.lower |
The 1-sided lower tolerance bound. This is given only if side = 1 . |
1-sided.upper |
The 1-sided upper tolerance bound. This is given only if side = 1 . |
2-sided.lower |
The 2-sided lower tolerance bound. This is given only if side = 2 . |
2-sided.upper |
The 2-sided upper tolerance bound. This is given only if side = 2 . |
Brown, L. D., Cai, T. T., and DasGupta, A. (2001), Interval Estimation for a Binomial Proportion, Statistical Science, 16, 101–133.
Hahn, G. J. and Chandra, R. (1981), Tolerance Intervals for Poisson and Binomial Variables, Journal of Quality Technology, 13, 100–110.
## 85%/90% 1-sided binomial tolerance limits for a future ## lot of 500 when a sample of 40 were drawn from a lot of ## 1000. The Agresti-Coull, Clopper-Pearson, and large-sample ## methods are presented for comparison. bintol.int(x = 40, n = 1000, m = 500, alpha = 0.15, P = 0.90, side = 1, method = "AC") bintol.int(x = 40, n = 1000, m = 500, alpha = 0.15, P = 0.90, side = 1, method = "CP") bintol.int(x = 40, n = 1000, m = 500, alpha = 0.15, P = 0.90, side = 1, method = "LS")