m
, alpha
, and P
, this function solves the necessary sample size such that the
r
-th (or (n-s+1
)-th) order statistic is the [100(1-alpha)%, 100(P)%]
lower (or upper) tolerance
limit (see the Details section below for further explanation). This function can also report all combinations of order
statistics for 2-sided intervals.np.order(m, alpha = 0.05, P = 0.99, indices = FALSE)
m
is defined.P
of the population with the order statistics.1-alpha
with the order statistics.m>1
.indices = FALSE
, then a single number is returned for the necessary sample size such that the
r
-th (or (n-s+1
)-th) order statistic is the [100(1-alpha)%, 100(P)%]
lower (or upper) tolerance
limit. If indices = TRUE
, then a list is returned with a single number for the necessary sample size and a matrix
with 2 columns where each row gives the pairs of indices for the order statistics for all permissible [100(1-alpha)%, 100(P)%]
2-sided tolerance intervals.m=s+r
such that the probability is at least 1-alpha
that at least the
proportion P
of the population is below the (n-s+1
)-th order statistic for the upper limit or above the r
-th order statistic
for the lower limit. This means for the 1-sided upper limit that r=1
, while for the 1-sided lower limit it means that s=1
.
For the 2-sided tolerance intervals, m=s+r
such that the probability is at least 1-alpha
that at least the
proportion P
of the population is between the r
-th and (n-s+1
)-th order statistics. Thus, all combinations of r>0 and
s>0 such that m=s+r
are considered.nptol.int
## Only requesting the sample size.
np.order(m = 5, alpha = 0.05, P = 0.95)
## Requesting the order statistics indices as well.
np.order(m = 5, alpha = 0.05, P = 0.95, indices = TRUE)
Run the code above in your browser using DataLab