Learn R Programming

tolerance (version 1.2.0)

uniftol.int: Uniform Tolerance Intervals

Description

Provides 1-sided or 2-sided tolerance intervals for data distributed according to a uniform distribution.

Usage

uniftol.int(x, alpha = 0.05, P = 0.99, upper = NULL, lower = NULL, side = 1)

Arguments

x
A vector of data which is distributed according to a uniform distribution.
alpha
The level chosen such that 1-alpha is the confidence level.
P
The proportion of the population to be covered by this tolerance interval.
upper
The upper bound of the data. When NULL, then the maximum of x is used.
lower
The lower bound of the data. When NULL, then the minimum of x is used.
side
Whether a 1-sided or 2-sided tolerance interval is required (determined by side = 1 or side = 2, respectively).

Value

uniftol.int returns a data frame with items:
alpha
The specified significance level.
P
The proportion of the population covered by this tolerance interval.
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.

References

Faulkenberry, G. D. and Weeks, D. L. (1968), Sample Size Determination for Tolerance Limits, Technometrics, 10, 343--348.

Examples

Run this code
## 90%/90% 1-sided uniform tolerance intervals for a sample
## of size 50 with a known lower bound of 0. 

set.seed(100)
x <- runif(50, 0, 50)
out <- uniftol.int(x = x, alpha = 0.10, P = 0.90, lower = 0,
                   side = 1) 
out

plottol(out, x, plot.type = "hist", side = "two", 
        x.lab = "Uniform Data")

Run the code above in your browser using DataLab