# hypersampleplan.fixedn: Attribute sampling plans when the sample size n is known and... In hypersampleplan: Attribute Sampling Plan with Exact Hypergeometric Probabilities using Chebyshev Polynomials

## Description

Attribute sampling is an important field of statistical quality control. When a lot is submitted for inspection, 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 program is designed to compute the acceptance number c when the sample size n is known and fixed.

## Usage

 `1` ```hypersampleplan.fixedn(a, b, k1, k2, n, N) ```

## Arguments

 `a` Producer's risk alpha: the probability of rejecting a lot for proportion defective `b` Consumer's risk beta: the probability of accepting a lot for proportion defective `k1` Number of defective units in a satisfactory quality level; `k2` Number of defective units in an unsatisfactory quality level; `n` Fixed sample size `N` Lot Size

## Value

a matrix that contain the acceptance number c (number of defective units allowed in a lot which is accepted) in the row of sampling.plan.X.

## References

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``` ```# For the attribute sampling plan with fixed sample size n hypersampleplan.fixedn(0.01, 0.10, 40, 80, 307, 1000) ```