One of the most widely used quality control tools is the *attribute acceptance sampling plan*, which can be applied in a variety of ways. For example, in the context of manufacturing, it can be used to make sure that the quality of incoming parts satisfies certain requirements before they are assembled, that the quality of semi-finished products is acceptable before they are passed to the next manufacturing stage, or that the quality of finished products satisfies the customer’s specifications before they are shipped.

Each attribute sampling plan has three parameters (*N*, *n*, *c*) -- lot size, sample size, and acceptance number, respectively*.* The operation of an attribute sampling plan is simple. You select a random sample of *n* units from the incoming lot of size *N*. You then determine the number of defective components in the sample. If this number does not exceed the pre-determined *c*, the lot is accepted; otherwise the lot is rejected.

The quality level of a lot is usually expressed as percentage defective or fraction defective. For instance, a quality level of *p * = 10% means that there are 10% defective units in the lot. If *p * = 0%, all units in the lot are good, whereas if *p * = 100%, all units are defective. It is worth noting that, if a lot has a quality level of *p * = 0%, then it will be accepted no matter what sampling plan (*N*, *n*, *c*) is chosen. However, unless the quality level *p* is 100%, a lot with a high percent defective, say 30%, will still have a chance of being accepted.

Despite its wide applicability, there are two types of risk associated with each attribute sampling plan.

- The first type of risk is that a lot with a good quality level is rejected. We want to accept such lots most of the time. That is, the probability
*P*of lot acceptance should be high for good quality level lots. However, because of sampling, there is a possibility that the number of defectives found in the sample exceeds_{a}*c*, which will lead to the decision that a good quality level lot is rejected. This type of risk is called the producer’s risk. - The second type of risk is that a lot with a bad quality level is accepted. We want to reject such lots most of the time. That is, the probability
*P*of lot acceptance should be low for bad quality level lots. However, because of sampling, there is a possibility that the number of defectives found in the sample does not exceed_{a}*c*, which will lead to the decision that a bad quality level lot is accepted. This type of risk is called the consumer’s risk.

The risks associated with a sampling plan can be read from the *operating characteristic* (OC) *curve*, which is a graph showing the probability *P _{a}* of lot acceptance for different lot quality levels.

There are two ways to calculate the probability of lot acceptance. Suppose that the sampling plan is (*N*, *n*, *c*) and the quality level of the lot is *p*. The first method is an exact one. The number *X* of defectives found in a sample will follow a Hypergeometric distribution, so the probability of lot acceptance is

,

Note that *Np* is an integer in this formula.

The second method is approximate. When the ratio is small, the Hypergeometric distribution can be approximated well by the Binomial distribution. Thus the probability of acceptance can be approximated by

.

The following figure shows the OC curves for plans with *N = * 1000, *n * = 50, *c* = 0 and *N* = 500, *n * = 25, *c * = 0. Here the probability of acceptance is calculated using the Hypergeometric distribution.

Using the plan (*N*, *n*, *c*) = (500, 25, 0), a lot with a relatively good quality level of 0.01 will still have about a chance of 0.23 being rejected. That is, the producer’s risk is 0.23. Using the same plan, a lot with a relatively bad quality level of 0.1 will still have a chance of 0.07 being accepted. That is, the consumer’s risk is 0.07. It is worth noting that, despite the two plans (500, 25, 0) and (1000, 50, 0) having the same ratio, their OC curves are different.