# simnormtolint: Simultaneous Normal (or Log-Normal) Tolerance Intervals In tolerance: Statistical Tolerance Intervals and Regions

## Description

Provides simultaneous 1-sided or 2-sided tolerance intervals for data distributed according to either a normal distribution or log-normal distribution.

## Usage

 ```1 2``` ```simnormtol.int(x, alpha = 0.05, P = 0.99, side = 1, method = c("EXACT", "BONF"), m = 50, log.norm = FALSE) ```

## Arguments

 `x` Either a matrix or list of vectors of the data. If a matrix, then the columns are the samples from the different normal (or log-normal) populations. If `method = "EXACT"`, then `x` must be a matrix. `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. `side` Whether simultaneous 1-sided or 2-sided tolerance intervals are required (determined by `side = 1` or `side = 2`, respectively). `method` The method for calculating the k-factors. `"EXACT"` is an exact method that can be used when all `l` groups have the same sample size. `"BONF"` is an approximate method using the Bonferroni inequality, which can be used when the `l` groups have different sample sizes. `m` The maximum number of subintervals to be used in the `integrate` function. This is necessary only for `method = "EXACT"`. The larger the number, the more accurate the solution. Too low of a value can result in an error. A large value can also cause the function to be slow for `method = "EXACT"`. `log.norm` If `TRUE`, then the data is considered to be from a log-normal distribution, in which case the output gives tolerance intervals for the log-normal distribution. The default is `FALSE`.

## Details

Recall that if the random variable X is distributed according to a log-normal distribution, then the random variable Y = ln(X) is distributed according to a normal distribution.

## Value

`normtol.int` returns a data frame with items:

 `alpha` The specified significance level. `P` The proportion of the population covered by this tolerance interval. `x.bar` The sample means. `1-sided.lower` The simultaneous 1-sided lower tolerance bounds. This is given only if `side = 1`. `1-sided.upper` The simultaneous 1-sided upper tolerance bounds. This is given only if `side = 1`. `2-sided.lower` The simultaneous 2-sided lower tolerance bounds. This is given only if `side = 2`. `2-sided.upper` The simultaneous 2-sided upper tolerance bounds. This is given only if `side = 2`.

## Note

The code for this functions is built upon code provided by Andrew Landgraf.

## References

Krishnamoorthy, K. and Mathew, T. (2009), Statistical Tolerance Regions: Theory, Applications, and Computation, Wiley.

Mee, R. W. (1990), Simultaneous Tolerance Intervals for Normal Populations with Common Variance, Technometrics, 32, 83-92.

`Normal`, `K.factor.sim`
 ```1 2 3 4 5 6 7 8 9``` ``` ## 95%/95% simultaneous 2-sided normal tolerance ## intervals for three samples of unequal size. set.seed(100) x <- list(rnorm(20),rnorm(10,1),rnorm(12,1,2)) out <- simnormtol.int(x = x, alpha = 0.05, P = 0.95, side = 2, method = "BONF") out ```