Description Usage Arguments Value Note References Examples
Attribute sampling is an important field of statistical quality control. When a lot is submitted for inspection of quality control, a sampling plan must specify both the number of samples to be drawn from the lot as well as the acceptance number which is the maximum number of defective items found in the sample that would still make the lot acceptable. Since the sample is not free of defective, there are probabilities of accepting a lot which is actually not acceptable and of rejecting one which is acceptable. The hypergeometric distribution using Chebyshev Polynomials forms the basis for calculating those exact probabilities.
This algorithm is proposed to compute upper and lower confidence limits for the number of defective in a lot given (n, x,N)
1 | hypersampleplan.CL(n, x, N)
|
n |
sample size |
x |
the observed number of defective items in a random sample |
N |
lot size |
a matrix that provides one-sided confidence limits. For a lower confidence limit the confidence is CL.Lower; for an upper confidence limit the confidence is CL.Upper; for a two-sided limit it is CL.Upper - CL.Lower.
The value of k is interpreted as: For lower confidence limits, one can be (1 - Conf.Limits.1)% sure that the number of defective units in the lot is at least k1. For upper confidence limits, one can be (Conf.Limits.2)% sure that the number of defective units in the lot is at most k2.
Since the real probability cannot be just equal to 0.95 or 975 and 0.025 or 0.05, the ranges are then taken to allow the output to include all possible values. It can be certainly changed to any ranges without interference with the execution of the program itself except the execution time may be shorter or longer.
Alvo, M., & Cabilio, P. (2000). Calculation of hypergeometric probabilities using Chebyshev polynomials. The American Statistician, 54(2), 141-144.
Odeh, R. (1983). Attribute sampling plans, tables of tests and confidence limits for proportions (Vol. 49). CRC Press.
1 2 3 4 | # When one observes 12 defective items in a sample of size 160 taken from a lot size 1000,
# it will give the results for the one-sided 97.5% upper and lower confidence limits for
# the number of defective items in the lot.
hypersampleplan.CL(160, 12, 1000)
|
n k Conf.Limits
CL.Lower.1 41 12 0.02116213
CL.Lower.2 42 12 0.02558251
CL.Lower.3 43 12 0.03064620
CL.Lower.4 44 12 0.03639824
CL.Lower.5 45 12 0.04288032
CL.Upper.1 116 12 0.95354971
CL.Upper.2 117 12 0.95732460
CL.Upper.3 118 12 0.96083066
CL.Upper.4 119 12 0.96408314
CL.Upper.5 120 12 0.96709682
CL.Upper.6 121 12 0.96988599
CL.Upper.7 122 12 0.97246444
CL.Upper.8 123 12 0.97484537
CL.Upper.9 124 12 0.97704147
CL.Upper.10 125 12 0.97906486
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.