Learn R Programming

tolerance (version 0.4.0)

diffnormtol.int: 1-Sided Tolerance Limits for the Distribution of the Difference Between Two Independent Random Variables

Description

Provides 1-sided tolerance limits for the difference between two independent normal random variables. If the ratio of the variances is known, then an exact calculation is performed. Otherwise, approximation methods are implemented.

Usage

diffnormtol.int(x1, x2, var.ratio = NULL, alpha = 0.05, 
                P = 0.99, method = c("HALL", "GK", "RG"))

Arguments

x1
A vector of sample data which is distributed according to a normal distribution (sample 1).
x2
Another vector of sample data which is distributed according to a normal distribution (sample 2). It can be of a different sample size than the sample specified by x1.
var.ratio
A specified, known value of the variance ratio (i.e., the ratio of the variance for population 1 to the variance of population 2). If NULL, then the variance ratio is estimated according to one of the three methods specified in the m
alpha
The level chosen such that 1-alpha is the confidence level.
P
The proportion of the population to be covered by the tolerance limits.
method
The method for estimating the variance ratio. This only needs to be specified in the case when var.ratio is not NULL. "HALL" is Hall's method, which takes a bias-corrected version of the ratio between the sample

Value

  • diffnormtol.int returns a data frame with items:
  • alphaThe specified significance level.
  • PThe proportion of the population covered by this tolerance interval.
  • diff.barThe difference between the sample means.
  • 1-sided.lowerThe 1-sided lower tolerance bound.
  • 1-sided.upperThe 1-sided upper tolerance bound.

Details

Satterthwaite's approximation for the degrees of freedom is used when the variance ratio is unknown.

References

Guo, H. and Krishnamoorthy, K. (2004), New Approximate Inferential Methods for the Reliability Parameter in a Stress-Strength Model: The Normal Case, Communications in Statistics - Theory and Methods, 33, 1715--1731. Hall, I. J. (1984), Approximate One-Sided Tolerance Limits for the Difference or Sum of Two Independent Normal Variates, Journal of Quality Technology, 16, 15--19. Krishnamoorthy, K. and Mathew, T. (2009), Statistical Tolerance Regions: Theory, Applications, and Computation, Wiley. Reiser, B. J. and Guttman, I. (1986), Statistical Inference for Pr(Y < X): The Normal Case, Technometrics, 28, 253--257.

See Also

Normal, K.factor, normtol.int

Examples

Run this code
## 90\%/99\% tolerance limits for the difference between two
## simulated normal data sets.  This data is taken from
## Krishnamoorthy and Mathew (2009).  Note that there is a
## calculational error in their example, which yields different
## results with the output below. 

x1 <- c(10.166, 5.889, 8.258, 7.303, 8.757)
x2 <- c(-0.204, 2.578, 1.182, 1.892, 0.786, -0.517, 1.156,
        0.980, 0.323, 0.437, 0.397, 0.050, 0.812, 0.720)

diffnormtol.int(x1, x2, alpha = 0.10, P = 0.99, method = "HALL")
diffnormtol.int(x1, x2, alpha = 0.10, P = 0.99, method = "GK")
diffnormtol.int(x1, x2, alpha = 0.10, P = 0.99, method = "RG")
diffnormtol.int(x1, x2, var.ratio = 3.8, alpha = 0.10, P = 0.99)

Run the code above in your browser using DataLab