Learn R Programming

tolerance (version 0.4.0)

negbintol.int: Negative Binomial Tolerance Intervals

Description

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).

Usage

negbintol.int(x, n = NULL, N, m, alpha = 0.05, P = 0.99, 
              side = 1)

Arguments

x
The total number of failures that occur from a sample of size n. Can be a vector of length n, in which case the sum of x is computed.
n
The size of the random sample from this process. Note that if the sum of x is provided, then n needs to be specified in order to provide correct estimates.
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 m = NULL, then the tolerance limits will be constructed assuming N for the target number of future successes.
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).

Value

  • negbintol.int returns a data frame with items:
  • alphaThe specified significance level.
  • PThe proportion of defective (or acceptable) units in future samples of size m.
  • nu.hatThe probability of success in each trial, calculated by N/(N+x/n).
  • 1-sided.lowerThe 1-sided lower tolerance bound. This is given only if side = 1.
  • 1-sided.upperThe 1-sided upper tolerance bound. This is given only if side = 1.
  • 2-sided.lowerThe 2-sided lower tolerance bound. This is given only if side = 2.
  • 2-sided.upperThe 2-sided upper tolerance bound. This is given only if side = 2.

Details

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.

References

Hahn, G. J. and Chandra, R. (1981), Tolerance Intervals for Poisson and Binomial Variables, Journal of Quality Technology, 13, 100--110.

See Also

NegBinomial, umatol.int

Examples

Run this code
## Comparison of 95%/99% 1-sided tolerance limits with the 
## uniformly most accurate approach when there are 10 trials 
## (resulting in 50 failures) before 3 successes are reached for 
## each trial.

umatol.int(x = 50, n = 10, N = 3, dist = "NegBin")
negbintol.int(x = 50, n = 10, N = 3, side = 1)

## 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, N = 3, m = 20, side = 1)
negbintol.int(x = 50, n = 10, N = 3, m = 20, side = 2)

Run the code above in your browser using DataLab