negbintol.int | R Documentation |
Provides 1-sided or 2-sided tolerance intervals for negative binomial random variables. From a statistical quality control perspective, these limits use the number of failures that occur to reach n
successes to bound the number of failures for a specified amount of future successes (m
).
negbintol.int(x, n, m = NULL, alpha = 0.05, P = 0.99,
side = 1, method = c("LS", "WU", "CB",
"CS", "SC", "LR", "SP", "CC"))
x |
The total number of failures that occur from a sample of size |
n |
The target number of successes (sometimes called size) for each trial. |
m |
The target number of successes in a future lot for which the tolerance limits will be calculated. If |
alpha |
The level chosen such that |
P |
The proportion of the defective (or acceptable) units in future samples of size |
side |
Whether a 1-sided or 2-sided tolerance interval is required (determined by |
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 |
This function takes the approach for Poisson and binomial random variables developed in Hahn and Chandra (1981) and applies it to the negative binomial case.
negbintol.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 |
pi.hat |
The probability of success in each trial, calculated by |
1-sided.lower |
The 1-sided lower tolerance bound. This is given only if |
1-sided.upper |
The 1-sided upper tolerance bound. This is given only if |
2-sided.lower |
The 2-sided lower tolerance bound. This is given only if |
2-sided.upper |
The 2-sided upper tolerance bound. This is given only if |
Recall that the geometric distribution is the negative binomial distribution where the size is 1. Therefore, the case when n = m = 1
will provide tolerance limits for a geometric distribution.
Casella, G. and Berger, R. L. (1990), Statistical Inference, Duxbury Press.
Hahn, G. J. and Chandra, R. (1981), Tolerance Intervals for Poisson and Binomial Variables, Journal of Quality Technology, 13, 100–110.
Tian, M., Tang, M. L., Ng, H. K. T., and Chan, P. S. (2009), A Comparative Study of Confidence Intervals for Negative Binomial Proportions, Journal of Statistical Computation and Simulation, 79, 241–249.
Young, D. S. (2014), A Procedure for Approximate Negative Binomial Tolerance Intervals, Journal of Statistical Computation and Simulation, 84, 438–450.
NegBinomial
, umatol.int
## Comparison of 95%/99% 1-sided tolerance limits with
## 50 failures before 10 successes are reached.
negbintol.int(x = 50, n = 10, side = 1, method = "LS")
negbintol.int(x = 50, n = 10, side = 1, method = "WU")
negbintol.int(x = 50, n = 10, side = 1, method = "CB")
negbintol.int(x = 50, n = 10, side = 1, method = "CS")
negbintol.int(x = 50, n = 10, side = 1, method = "SC")
negbintol.int(x = 50, n = 10, side = 1, method = "LR")
negbintol.int(x = 50, n = 10, side = 1, method = "SP")
negbintol.int(x = 50, n = 10, side = 1, method = "CC")
## 95%/99% 1-sided tolerance limits and 2-sided tolerance
## interval for the same setting above, but when we are
## interested in a future experiment that requires 20 successes
## be reached for each trial.
negbintol.int(x = 50, n = 10, m = 20, side = 1)
negbintol.int(x = 50, n = 10, m = 20, side = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.