# normss: Sample Size Determination for Normal Tolerance Intervals In tolerance: Statistical Tolerance Intervals and Regions

## Description

Provides minimum sample sizes for a future sample size when constructing normal tolerance intervals. Various strategies are available for determining the sample size, including strategies that incorporate known specification limits.

## Usage

 ```1 2 3 4 5``` ```norm.ss(x = NULL, alpha = 0.05, P = 0.99, delta = NULL, P.prime = NULL, side = 1, m = 50, spec = c(NA, NA), hyper.par = list(mu.0 = NULL, sig2.0 = NULL, m.0 = NULL, n.0 = NULL), method = c("DIR", "FW", "YGZO")) ```

## Arguments

 `x` A vector of current data that is distributed according to a normal distribution. This is only required for `method = "YGZO"`. `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. `delta` The precision measure for the future tolerance interval as specified under the Faulkenberry-Weeks method. `P.prime` The proportion of the population (greater than `P`) such that the tolerance interval of interest will only exceed `P.prime` by the probability given by `delta`. `side` Whether a 1-sided or 2-sided tolerance interval is required (determined by `side = 1` or `side = 2`, respectively). `m` The maximum number of subintervals to be used in the `integrate` function, which is used for the underlying exact method for calculating the normal tolerance intervals. `spec` A vector of length 2 given known specification limits. These are required when `method = "DIR"` or `method = "YGZO"`. By default, the values are `NA`. The two elements of the vector are for the lower and upper specification limits, respectively. If `side = 1`, then only one of the specification limits must be specified. If `side = 2`, then both specification limits must be specified. `hyper.par` Necessary parameter values for the different methods. If `method = "DIR"` or `method = "YGZO"`, then `mu.0` and `sig2.0` must be specified, which correspond to the assumed population mean and variance of the underlying normal distribution, which further pertains to the historical data for `method = "YGZO"`. If `method = "YGZO"` and the sample size is to be determined using Bayesian normal tolerance intervals, then this is a required list consisting of the hyperparameters for the conjugate prior – the hyperparameters for the mean (`mu.0 and n.0`) and the hyperparameters for the variance (`sig2.0` and `m.0`). `method` The method for performing the sample size determination. `"DIR"` is the direct method (intended as a simple calculation for planning purposes) where the mean and standard deviation are taken as truth and the sample size is determined with respect to the given specification limits. `"FW"` is for the traditional Faulkenberry-Weeks approach for sample size determination. `"YGZO"` is for the Young-Gordon-Zhu-Olin approach, which incorporates historical data and specification limits for determining the value of `delta` and/or `P.prime` in the Faulkenberry-Weeks approach. Note that for `"YGZO"`, at least one of `delta` and `P.prime` must be `NULL`.

## Value

`norm.ss` returns a data frame with items:

 `alpha` The specified significance level. `P` The proportion of the population covered by this tolerance interval. `delta` The user-specified or calculated precision measure. Not returned if `method = "DIR"`. `P.prime` The user-specified or calculated closeness measure. Not returned if `method = "DIR"`. `n` The minimum sample size determined using the conditions specified for this function.

## References

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

Young, D. S., Gordon, C. M., Zhu, S., and Olin, B. D. (2016), Sample Size Determination Strategies for Normal Tolerance Intervals Using Historical Data, Quality Engineering, 28, 337–351.

`bayesnormtol.int`, `Normal`, `normtol.int`
 ```1 2 3 4 5 6 7 8``` ``` ## Sample size determination for 95%/95% 2-sided normal ## tolerance intervals using the direct method. set.seed(100) norm.ss(alpha = 0.05, P = 0.95, side = 2, spec = c(-3, 3), method = "DIR", hyper.par = list(mu.0 = 0, sig2.0 = 1)) ```