bintol.int | R Documentation |
Provides 1-sided or 2-sided tolerance intervals for binomial random variables. From a statistical quality control perspective, these limits use the proportion of defective (or acceptable) items in a sample to bound the number of defective (or acceptable) items in future productions of a specified quantity.
bintol.int(x, n, m = NULL, alpha = 0.05, P = 0.99, side = 1,
method = c("LS", "WS", "AC", "JF", "CP", "AS",
"LO", "PR", "PO", "CL", "CC", "CWS"),
a1 = 0.5, a2 = 0.5)
x |
The number of defective (or acceptable) units in the sample. Can be a vector of length |
n |
The size of the random sample of units selected for inspection. |
m |
The quantity produced in future groups. If |
alpha |
The level chosen such that |
P |
The proportion of the defective (or acceptable) units in future samples of size |
side |
Whether a 1-sided or 2-sided tolerance interval is required (determined by |
method |
The method for calculating the lower and upper confidence bounds, which are used in the calculation
of the tolerance bounds. The default method is |
a1 |
This specifies the first shape hyperparameter when using Jeffreys' method. |
a2 |
This specifies the second shape hyperparameter when using Jeffreys' method. |
bintol.int
returns a data frame with items:
alpha |
The specified significance level. |
P |
The proportion of defective (or acceptable) units in future samples of size |
p.hat |
The proportion of defective (or acceptable) units in the sample, calculated by |
1-sided.lower |
The 1-sided lower tolerance bound. This is given only if |
1-sided.upper |
The 1-sided upper tolerance bound. This is given only if |
2-sided.lower |
The 2-sided lower tolerance bound. This is given only if |
2-sided.upper |
The 2-sided upper tolerance bound. This is given only if |
Brown, L. D., Cai, T. T., and DasGupta, A. (2001), Interval Estimation for a Binomial Proportion, Statistical Science, 16, 101–133.
Hahn, G. J. and Chandra, R. (1981), Tolerance Intervals for Poisson and Binomial Variables, Journal of Quality Technology, 13, 100–110.
Newcombe, R. G. (1998), Two-Sided Confidence Intervals for the Single Proportion: Comparison of Seven Methods, Statistics in Medicine, 17, 857–872.
Binomial
, umatol.int
## 85%/90% 2-sided binomial tolerance intervals for a future
## lot of 2500 when a sample of 230 were drawn from a lot of
## 1000. All methods but Jeffreys' method are compared
## below.
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 2, method = "LS")
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 2, method = "WS")
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 2, method = "AC")
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 2, method = "CP")
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 2, method = "AS")
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 2, method = "LO")
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 2, method = "PR")
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 2, method = "PO")
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 2, method = "CL")
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 2, method = "CC")
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 2, method = "CWS")
## Using Jeffreys' method to construct the 85%/90% 1-sided
## binomial tolerance limits. The first calculation assumes
## a prior on the proportion of defects which places greater
## density on values near 0. The second calculation assumes
## a prior on the proportion of defects which places greater
## density on values near 1.
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 1, method = "JF", a1 = 2, a2 = 10)
bintol.int(x = 230, n = 1000, m = 2500, alpha = 0.15, P = 0.90,
side = 1, method = "JF", a1 = 5, a2 = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.