Abstract
The problem of constructing nonparametric equal-tailed tolerance intervals is considered. A method for finding minimum sample size required so that the rth order statistic and the largest rth order statistic form a p content– coverage equal-tailed tolerance interval is proposed. A simultaneous test for quantiles is also provided. Minimum sample sizes that are required to construct equal-tailed TIs and those to carry out hypothesis tests at a given nominal level are presented. The methods are illustrated using data collected from a new secure messaging system.
Keywords: Content level, coverage probability, equivalency of devices, order statistics, sampling inspection
1. Introduction
A tolerance interval (TI) is a statistical interval based on a random sample that would include a specified percentage of the population with high confidence. For example, a statistical interval that includes at least a proportion p of the sampled population with confidence is usually called p-content– coverage two-sided TI or simply two-sided TI. Owen (1964) has introduced another two-sided TI with some constraints that have applications in sampling inspection plans. This TI controls the percentages of population in both tails, and is commonly referred to as the “equal-tailed” TI. Formally, the equal-tailed TI is constructed so that not only it captures at least proportion p of the population, but also at most 100 percentage of the population lies in the left tail and at most 100 percentage of the population lies in the right tail. Both two-sided TIs and equal-tailed TIs are available for most of the commonly used continuous populations such as the normal, exponential, Weibull and gamma. See the book by Krishnamoorthy and Mathew [6] and Hoang–Nguyen–Thuy and Krishnamoorthy [3].
Construction of tolerance intervals for parametric continuous distributions highly depends on the model assumption. Tolerance intervals that are appropriate for any continuous distribution can be constructed using a nonparametric approach. In general, if a sample does not fit a parametric model, then one may seek nonparametric statistical intervals for intended applications. For a given , a nonparametric tolerance interval that satisfies specified content-coverage requirement may not exist. Let be a random sample from a continuous distribution , and let be the order statistics for the sample. A nonparametric tolerance interval is formed by a pair of order statistics that are determined by the content and coverage requirements. A nonparametric TI of the form is constructed so that
or equivalently,
| (1) |
For simplicity and convenience, s is set as n−r + 1, so that is a tolerance interval (see Wilks [8]). Note that the interval is formed by the rth smallest order statistic and the rth largest order statistic so that it would include at least a proportion p of the population with confidence . For a given , minimum sample size needed to compute TI of the form can be obtained using some standard software packages, R-package ‘tolerance’ by Young [10] and the PC calculator that accompanies the book by Krishnamoorthy [4]. This nonparametric TIs are further improved by Young and Mathew [11]. For multivariate nonparametric tolerance region, refer to Young and Mathew [12] and for construction of tolerance intervals for nonparametric regression refer to Guo and Young [2].
The tolerance interval determined by (1) includes at least 100p percentage of the population with confidence . This means that at most % of the population lies outside the interval. However, it is not clear what percentage of population lies in the left tail and what percentage lies in the right-tail. Owen [7] has noted that there are practical situations where one wants to assess the percentages of data fall in both tails. He has proposed a sampling plan which is designed to accept a lot if the samples provide enough evidence to indicate that at most 100 % of items' characteristics falls below a lower specification limit and at most 100 % of items' characteristics falls above an upper specification limit . Assuming normality, Owen (1964) has proposed an exact test. Also, see Chapter 2 of Krishnamoorthy and Mathew [6].
In this article, we provide nonparametric methods of finding equal-tailed TIs and simultaneous testing of lower and upper quantiles of a continuous population. In the following section, we describe a method of determining TIs of the form so that at most 100 % of the population less than and at most 100 % of the population greater than with confidence . Notice that includes at least 100p% of the center of the population. In Section 3, we address the problem of simultaneous testing on lower and upper quantiles. This simultaneous test also involves determining a pair of statistics so that the type I error rates are within the nominal significance level. In Section 4, we provide an example to illustrate the methods. Some concluding remarks are given in Section 5.
2. Equal-tailed tolerance intervals
Let be order statistics for a sample of size n from a continuous population with a distribution function . We like to construct a equal-tailed TI of the form , , so that
For convenience, write . The above probability can be expressed as
| (2) |
It is well-known that is distributed like , where is the kth order statistic for a sample of size n from a uniform distribution. Using this result, we can write (2) as
The joint probability density function of and , , is given by
For example, see Section 2.6 of Gibbons and Chakraborty [1]. Letting , the probability in (2) can be written as
| (3) |
Let and denote the beta density function and the distribution function with shape parameters a>0 and b>0. As shown in the appendix, letting s = n−r + 1, the above integral can be simplified and expressed as
| (4) |
For a given , the minimum sample size n must be determined so that
| (5) |
and is a equal-tailed TI.
For a given , we computed the minimum sample size that satisfies the probability requirement (5) and reported them in Table 1 for values of , p = 0.80, 0.90, 0.95 and 0.99 and and 0.99. As an example, the minimum sample size required so that the 4th smallest order statistic and the 4th largest order statistic form a 0.90 content–0.95 coverage equal-tailed TI is 173. That is, if we have a sample of size 173, then is a (0.90, 0.95) equal-tailed TI. Furthermore, at most 5% of the population lies below and at most 5% of the population exceeds with confidence 0.95. For any value of not reported in Table 1, we can find the sample size n using the R function ssize.np.eq.TI(r, p, cl) given in the appendix.
Table 1.
Sample size required so that is a equal-tailed TI.
| r | p = 0.80 | 0.90 | 0.95 | 0.99 | 0.80 | 0.90 | 0.95 | 0.99 | 0.8 | 0.90 | 0.95 | 0.99 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 29 | 58 | 118 | 593 | 35 | 72 | 146 | 734 | 51 | 104 | 210 | 1057 |
| 2 | 46 | 93 | 187 | 941 | 54 | 109 | 221 | 1110 | 72 | 146 | 294 | 1483 |
| 3 | 61 | 124 | 249 | 1251 | 70 | 142 | 286 | 1440 | 90 | 182 | 368 | 1851 |
| 4 | 75 | 153 | 307 | 1541 | 85 | 173 | 348 | 1748 | 106 | 216 | 435 | 2191 |
| 5 | 89 | 180 | 363 | 1820 | 100 | 202 | 406 | 2042 | 122 | 248 | 500 | 2514 |
| 6 | 103 | 207 | 417 | 2092 | 114 | 230 | 463 | 2327 | 137 | 279 | 562 | 2825 |
| 7 | 116 | 234 | 470 | 2357 | 127 | 258 | 519 | 2605 | 152 | 309 | 622 | 3127 |
| 8 | 129 | 260 | 522 | 2617 | 141 | 285 | 573 | 2877 | 167 | 338 | 681 | 3421 |
| 9 | 141 | 285 | 573 | 2874 | 154 | 311 | 626 | 3145 | 181 | 367 | 738 | 3710 |
| 10 | 154 | 310 | 623 | 3128 | 167 | 338 | 679 | 3409 | 195 | 395 | 795 | 3994 |
| 11 | 166 | 335 | 673 | 3379 | 180 | 364 | 731 | 3669 | 209 | 423 | 851 | 4274 |
| 12 | 179 | 360 | 723 | 3627 | 193 | 389 | 783 | 3927 | 222 | 450 | 906 | 4550 |
| 13 | 191 | 385 | 772 | 3874 | 205 | 415 | 834 | 4183 | 236 | 477 | 960 | 4823 |
| 14 | 203 | 409 | 821 | 4118 | 218 | 440 | 884 | 4437 | 249 | 504 | 1014 | 5093 |
| 15 | 215 | 433 | 870 | 4362 | 230 | 465 | 934 | 4688 | 262 | 531 | 1067 | 5360 |
| 16 | 227 | 457 | 918 | 4603 | 243 | 490 | 984 | 4938 | 275 | 557 | 1120 | 5626 |
| 17 | 239 | 481 | 966 | 4844 | 255 | 515 | 1034 | 5186 | 288 | 583 | 1173 | 5889 |
| 18 | 251 | 505 | 1014 | 5083 | 267 | 539 | 1083 | 5433 | 301 | 609 | 1225 | 6151 |
| 19 | 263 | 529 | 1061 | 5321 | 279 | 564 | 1132 | 5679 | 314 | 635 | 1277 | 6411 |
| 20 | 274 | 552 | 1109 | 5558 | 292 | 588 | 1181 | 5923 | 327 | 661 | 1328 | 6669 |
These nonparametric TIs are exact in the sense that the coverage probabilities are always greater than or equal to the nominal level. In general, nonparametric methods are known to be conservative in the sense that the coverage probabilities could be appreciably larger than the nominal level for some cases. To judge the degree of conservatism, we estimated the coverage probabilities of the TIs for some values of given in Table 1. The coverage probabilities were estimated for a linear combination of two Weibull distributions (i) 0.3 Weibull(3, 2) + 0.7 Weibull(2,1) and a combination of two gamma distributions (ii) 0.4 gamma(3,1) + 0.6 gamma(1,2). Here, Weibull denotes the Weibull distribution with the shape parameter c and the scale parameter b and gamma denotes the gamma distribution with the shape parameter a and the scale parameter b. Monte Carlo estimates of the coverage probabilities are reported in Table 2. We see in this table that for each entry in the first column, the corresponding estimated coverage probability is very close to . Closeness of these probabilities indicates that in the nonparametric setup, these TIs are not conservative. However, they could be wider than those constructed using parametric models.
Table 2.
Coverage probabilities of equal-tailed TIs.
| (i) | (ii) | |
|---|---|---|
| (.90, .90, 1, 58) | .901 | .900 |
| (.90, .90, 3, 124) | .903 | .895 |
| (.90, .95, 1, 72) | .950 | .951 |
| (.80, .90, 8, 128) | .897 | .901 |
| (.90, .99, 3, 182) | .990 | .990 |
| (.90, .95, 12, 389) | .952 | .947 |
Note: (i) 0.3 Weibull(3,2) + .7 Weibull(2,1); (ii) 0.4 gamma(3,1) + 0.6 gamma(1,2)
3. Simultaneous hypothesis testing about population quantiles
Consider the acceptance sampling plan where a lot will be accepted if collected samples provide sufficient evidence to indicate that at most a proportion of items' characteristics are less than a lower specification limit and at most a proportion of items' characteristics are greater than an upper specification limit . If denotes the pth quantile of the population, then a solution to the acceptance sampling plan can be obtained by testing if and based on a sample. The hypotheses of interest here are
| (6) |
A nonparametric test for the above hypotheses is to be developed so that the type I error rate is within the nominal level α.
Remark 3.1
Assuming normality, Owen (1964) has proposed a test that rejects the null hypothesis at the level of significance α if and where the critical value is to be determined so that Krishnamoorthy and Mathew [5] considered the above hypothesis testing problem in an application of establishing equivalency of a sampling device to the OSHA standard.
A way to develop a nonparametric test for the hypotheses in (6) is to determine the minimum sample size that is required so that
| (7) |
where . Proceeding as in the earlier section, the above requirement can be written as
where is the rth order statistic for a sample of size n. By considering the probability of the complimentary event, we see that the minimum sample size that satisfies the above requirement also satisfies
| (8) |
Using the De Morgan law and the result that has the beta distribution, the above requirement can be expressed as
| (9) |
where denotes the beta distribution function, and is given in (4).
We have computed sample sizes required to satisfy (9) for values of , and p = 0.80, 0.90, 0.95, 0.99, and presented them in Table 3. As an example, suppose a lot will be accepted at the level of significance 0.05, if the specification limits and . Referring to in Table 3, we find n = 28. The lot will be accepted if and . For any value of not reported in Table 1, we can find the sample size n using the R function ssize.np.quantile.test(r, p, alpha) in the appendix.
Table 3.
Sample size required so that .
| r | p = 0.80 | 0.90 | 0.95 | 0.99 | 0.80 | 0.90 | 0.95 | 0.99 | 0.8 | 0.90 | 0.95 | 0.99 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 11 | 22 | 45 | 230 | 14 | 29 | 59 | 299 | 21 | 44 | 90 | 459 |
| 2 | 23 | 46 | 94 | 472 | 27 | 55 | 112 | 567 | 36 | 75 | 153 | 775 |
| 3 | 34 | 69 | 140 | 704 | 39 | 80 | 162 | 818 | 50 | 103 | 210 | 1061 |
| 4 | 45 | 92 | 185 | 930 | 51 | 104 | 210 | 1061 | 63 | 130 | 264 | 1333 |
| 5 | 56 | 114 | 229 | 1153 | 63 | 128 | 258 | 1298 | 76 | 156 | 316 | 1595 |
| 6 | 67 | 136 | 273 | 1374 | 74 | 151 | 304 | 1531 | 88 | 181 | 367 | 1851 |
| 7 | 78 | 157 | 317 | 1593 | 85 | 174 | 350 | 1761 | 101 | 206 | 417 | 2102 |
| 8 | 88 | 179 | 360 | 1811 | 96 | 196 | 395 | 1990 | 113 | 231 | 466 | 2349 |
| 9 | 99 | 201 | 404 | 2028 | 108 | 219 | 441 | 2216 | 125 | 255 | 515 | 2594 |
| 10 | 110 | 222 | 447 | 2243 | 119 | 241 | 485 | 2441 | 137 | 279 | 563 | 2836 |
| 11 | 120 | 243 | 490 | 2458 | 130 | 263 | 530 | 2665 | 148 | 303 | 611 | 3076 |
| 12 | 131 | 265 | 532 | 2672 | 141 | 285 | 574 | 2887 | 160 | 326 | 658 | 3314 |
| 13 | 141 | 286 | 575 | 2886 | 152 | 307 | 619 | 3109 | 172 | 350 | 705 | 3550 |
| 14 | 152 | 307 | 617 | 3099 | 163 | 329 | 663 | 3330 | 183 | 373 | 752 | 3785 |
| 15 | 163 | 328 | 660 | 3312 | 173 | 351 | 707 | 3550 | 195 | 396 | 799 | 4019 |
| 16 | 173 | 349 | 702 | 3524 | 184 | 373 | 750 | 3769 | 206 | 419 | 845 | 4252 |
| 17 | 184 | 371 | 744 | 3736 | 195 | 395 | 794 | 3988 | 218 | 442 | 891 | 4484 |
| 18 | 194 | 392 | 787 | 3947 | 206 | 416 | 838 | 4206 | 229 | 465 | 937 | 4714 |
| 19 | 204 | 413 | 829 | 4158 | 217 | 438 | 881 | 4424 | 240 | 488 | 983 | 4944 |
| 20 | 215 | 434 | 871 | 4369 | 227 | 460 | 924 | 4641 | 251 | 511 | 1029 | 5173 |
The nonparametric tests are exact. However, like in the preceding section, these tests could be too conservative in some cases. To judge the error rates of the tests, we estimated the type I error rates for some values of given in Table 3. As in the preceding section, we used the same combination of two Weibull distributions, namely, (i) 0.3 Weibull(3, 2) + 0.7 Weibull(2,1) and the same combination of gamma distributions (ii) 0.4 gamma(3,1) + 0.6 gamma(1,2). Monte Carlo estimates of the error rates are given in Table 4. We note in this table that for each entry in the first column, the corresponding estimated error rates is very close to α. Comparison of these values indicates that in the nonparametric setup, these tests are not conservative.
Table 4.
Type I error rates of the quantile tests.
| (i) | (ii) | |
|---|---|---|
| (.90, .10, 1, 22) | .098 | .098 |
| (.90, .10, 3, 69) | .097 | .099 |
| (.90, .05, 1, 29) | .048 | .049 |
| (.80, .10, 8, 88) | .097 | .102 |
| (.90, .01, 3, 103) | .011 | .011 |
| (.90, .05, 12, 285) | .056 | .051 |
Note: (i) 0.3 Weibull(3,2) + .7 Weibull(2,1); (ii) 0.4 gamma(3,1) + 0.6 gamma(1,2)
4. Example
This example and the data are taken from Wurscher et al. [9]. It is concerned of efficacy and security of a New Secure Messaging System (NSMS). The system can send messages with a desired level of security, but the amount of time between sending and receiving the message is not well understood for this system. It is desirable to send and receive messages within 20 seconds for the system to be useable in the field. To understand the distribution of the delivery times, a sample of n = 52 runs was selected and the delivery times were recorded. The data are given in Table 5 of Wurscher et al. [9], and they are reproduced here in Table 5. In order to assess the speed of the delivery of messages, Wurscher et al. [9] wanted to place an upper bound below which 90% of delivery times lies. These authors have noted that the histogram of the data is not symmetric indicating that normality is not tenable. They have used a (.90, .90) nonparametric upper tolerance limit as an upper bound. We also checked if the data fit other parametric models such as the lognormal, Weibull, two-parameter exponential and gamma, and found none of them fits the data.
Table 5.
Delivery Times (in seconds) for high load low file size messages.
| 5.126429 | 8.212724 | 9.106340 | 9.253784 | 10.423324 |
| 12.393966 | 12.609172 | 12.670580 | 12.972754 | 13.195848 |
| 13.204790 | 13.447015 | 13.603801 | 13.629823 | 13.735626 |
| 13.738818 | 13.827530 | 14.171431 | 14.184233 | 14.445580 |
| 14.912384 | 15.412042 | 15.435410 | 15.464379 | 15.777407 |
| 16.333406 | 16.359170 | 16.364353 | 16.420189 | 16.667285 |
| 16.967149 | 17.018127 | 17.118655 | 17.160076 | 17.164883 |
| 17.688404 | 17.768533 | 18.238697 | 18.257817 | 18.405642 |
| 18.580804 | 18.763560 | 19.348932 | 19.500355 | 19.745636 |
| 19.748467 | 19.881802 | 20.735652 | 20.819050 | 21.452909 |
| 21.660328 | 21.717389 | |||
Using the R function ssize.np.eq.TI(r, p, cl) given in the appendix, we found that the required sample size of 52 so that is a (.861, .95) equal-tailed TI. Noting that , we can say that at most 7% of the delivery times is less than 5.126429 seconds and at most 7% of the delivery times is greater than 21.717389 seconds with confidence 95%. Furthermore, using the R function ssize.np.eq.TI(2, .795, .95), we found n = 52. That is, is a (.795, .95) equal-tailed TI. This means that at most 10% of the delivery times is less than 8.212724 seconds and at most 10% of the delivery times is greater than 21.660328 seconds.
Suppose we like to test where and are specified values, at the level 0.05. Noting that p = 0.85, we find the required sample size n = 52 at and r = 3. This sample size is not available in Table 3. We computed it using the R function ssn.quantile.test(r, p, alpha) given in the appendix. Note that there are 52 observations in Table 5. Also, and , which provides evidence to support that at most 7.5% of the delivery times is less than 8.5 seconds and at most 7.5% of the delivery times is greater than 21.5 seconds. Furthermore, at least 85% of the delivery times falls in the interval .
5. Concluding remarks
We provided a nonparametric approach to compute an equal-tailed TI, which is also known as the TI controlling percentages in both tails or TI capturing center of the population. For a given , this equal-tailed TIs are expected to be wider than the corresponding two-sided nonparametric TIs (see Section 8.4 of Krishnamoorthy and Mathew [6]). Furthermore, an equal-tailed TI requires larger sample size than the one requires to compute the corresponding two-sided TI, because the former TI not only captures at least a specified proportion of the population, but also controls the percentages of the population lie in both tails. We also provided a nonparametric test for quantiles that can be used in an accepting sampling plan if the sample data do not fit any continuous parametric distribution. It should be noted that the nonparametric methods proposed here are applicable to find TIs for any continuous distribution. However, large samples are needed to find a TI with specified values of content level p and confidence level . For some values of , we can not compute nonparametric TI using our method. For example, to construct a equal-tailed TI using the extreme order statistics, a sample of at least 72 observations is required (See Table 1). For any sample size smaller than 72, we can not find a equal-tailed nonparametric TI using the proposed method.
To help practitioners of statistics, we provide R function ssize.np.eq.TI(r, p, alpha) to determine the sample size to compute an equal-tailed TI at a desired value of , and R function ssize.np.quantile.test(r, p, alpha) to determine the sample size for simultaneous testing of quantiles.
Acknowledgments
The authors are grateful to two reviewers and an associate editor for providing valuable comments and suggestions.
Appendices.
Appendix 1.
To simplify the integral
| (A1) |
we first use the transformation so that and and write the above integral as
where Beta is the usual beta function. Recognizing the beta kernel in the above integral, we can further simplify the above expression as
It can be readily verified that the constant terms on the left hand side of the integral simplifies to 1, and thus we get
| (A2) |
Replacing s with n−r + 1, we get (4).
Appendix 2. R code
The following function computes the sample size n so that the interval is a (p, cl) equal-tailed TI. This function also returns the value of the actual coverage probability.
The following function computes the sample size n so that . This function also returns the value of the attained level.
Disclosure statement
No potential conflict of interest was reported by the author(s).
References
- 1.Gibbons J.D. and Chakraborti S., Nonparametric Statistical Inference, 4th ed., Marcel Dekker Inc, New York, 2003. [Google Scholar]
- 2.Guo Y. and Young D.S., Approximate tolerance intervals for nonparametric regression models, J. Nonparametr. Stat. 36 (2004), pp. 212–239. [Google Scholar]
- 3.Hoang-Nguyen-Thuy N. and Krishnamoorthy K., A method for computing tolerance intervals for a location-scale family of distributions, Comput. Stat. 36 (2021), pp. 1065–1092. [Google Scholar]
- 4.Krishnamoorthy K., Handbook of Statistical Distributions with Applications, 2nd ed., Chapman & Hall/CRC Press, Boca Raton, FL, 2015. [Google Scholar]
- 5.Krishnamoorthy K. and Mathew T., Statistical methods for establishing equivalency of a sampling device to the OSHA standard, Am. Ind. Hyg. Assoc. J. 63 (2002), pp. 567–571. [DOI] [PubMed] [Google Scholar]
- 6.Krishnamoorthy K. and Mathew T., Statistical Tolerance Regions: Theory, Applications and Computation, Wiley, Hoboken, NJ, 2009. [Google Scholar]
- 7.Owen D.B., Control of percentages in both tails of the normal distribution, Technometrics 6 (1964), pp. 377–387. (Corr: V8 p. 570). [Google Scholar]
- 8.Wilks S.S., Determination of sample sizes for setting tolerance limits, Ann. Math. Stat. 12 (1941), pp. 91–96. [Google Scholar]
- 9.Wurscher K., Jones N., and Sigler G., Nonparametric tolerance intervals. STAT COE-Report-02-2022, 2022, Air Force Institute of Technology, Wright Patterson AFB, OH 45433.
- 10.Young D.S., tolerance: Statistical Tolerance Intervals and Regions. R Package, Version 2.0.0, 2020.
- 11.Young D.S. and Mathew T., Improved nonparametric tolerance intervals based on interpolated and extrapolated order statistics., J. Nonparametr. Stat. 26 (2014), pp. 415–432. [Google Scholar]
- 12.Young D.S. and Mathew T., Nonparametric hyperrectangular tolerance and prediction regions for setting multivariate reference regions in laboratory medicine, Stat. Methods. Med. Res. 29 (2020), pp. 3569–3585. [DOI] [PubMed] [Google Scholar]
