Learn R Programming

spc (version 0.7.1)

tol.lim.fac: Two-sided tolerance limit factors

Description

For constructing tolerance intervals, which cover a given proportion \(p\) of a normal distribution with unknown mean and variance with confidence \(1-\alpha\), one needs to calculate the so-called tolerance limit factors \(k\). These values are computed for a given sample size \(n\).

Usage

tol.lim.fac(n,p,a,mode="WW",m=30)

Value

Returns a single value which resembles the tolerance limit factor.

Arguments

n

sample size.

p

coverage.

a

error probability \(\alpha\), resulting interval covers at least proportion p with confidence of at least \(1-\alpha\).

mode

distinguish between Wald/Wolfowitz' approximation method ("WW") and the more accurate approach ("exact") based on Gauss-Legendre quadrature.

m

number of abscissas for the quadrature (needed only for method="exact"), of course, the larger the more accurate.

Author

Sven Knoth

Details

tol.lim.fac determines tolerance limits factors \(k\) by means of the fast and simple approximation due to Wald/Wolfowitz (1946) and of Gauss-Legendre quadrature like Odeh/Owen (1980), respectively, who used in fact the Simpson Rule. Then, by \(\bar x \pm k \cdot s\) one can build the tolerance intervals which cover at least proportion \(p\) of a normal distribution for given confidence level of \(1-\alpha\). \(\bar x\) and \(s\) stand for the sample mean and the sample standard deviation, respectively.

References

A. Wald, J. Wolfowitz (1946), Tolerance limits for a normal distribution, Annals of Mathematical Statistics 17, 208-215.

R. E. Odeh, D. B. Owen (1980), Tables for Normal Tolerance Limits, Sampling Plans, and Screening, Marcel Dekker, New York.

See Also

qnorm for the ''asymptotic'' case -- cf. second example.

Examples

Run this code
n <- 2:10
p <- .95
a <- .05
kWW <- sapply(n,p=p,a=a,tol.lim.fac)
kEX <- sapply(n,p=p,a=a,mode="exact",tol.lim.fac)
print(cbind(n,kWW,kEX),digits=4)
## Odeh/Owen (1980), page 98, in Table 3.4.1
##  n  factor k
##  2  36.519
##  3   9.789
##  4   6.341
##  5   5.077
##  6   4.422
##  7   4.020
##  8   3.746
##  9   3.546
## 10   3.393

## n -> infty
n <- 10^{1:7}
p <- .95
a <- .05
kEX <- round(sapply(n,p=p,a=a,mode="exact",tol.lim.fac),digits=4)
kEXinf <- round(qnorm(1-a/2),digits=4)
print(rbind(cbind(n,kEX),c("infinity",kEXinf)),quote=FALSE)

Run the code above in your browser using DataLab