# Sequential Lot Acceptance Test Calculator

A sequential lot acceptance test calculator was recently added to the Reliability Analytics Toolkit.  Sequential testing is a very efficient way of demonstrating lot quality with relatively few samples.  The calculator tests the mean of the binomial distribution and can be applied where each unit is classified into one of two categories, good or defective. The underlying technique, developed during World War II, is based on the work of mathematician Abraham Wald while at Columbia University’s Statistical Research Group.

The figure below shows the possible sampling outcomes and the preferences for test decision outcome. “true p” in the example column below is the true proportion defective in the lot if all units were to be inspected.

Calculator input parameters are as follows:

• Unacceptable proportion defective (p1). The probability of accepting the lot does not exceed the consumer’s risk (β) whenever the true proportion defective (p) is greater than or equal to p1.
• Acceptable proportion defective (p0). The probability of rejecting the lot does not exceed the producer’s risk (α) whenever the true proportion defective (p) is less than or equal to p0.
• Consumer’s risk (β). The consumer’s risk is the probability of accepting a lot with a true proportion defective equal to or greater than the unacceptable proportion defective (p1). β probability of lot acceptance for Case 1.
• Producer’s risk (α). The producer’s risk is the probability of rejecting a lot with a true proportion defective equal to or less than the acceptable proportion defective (p0). α probability of lot rejection for Case 3.
• True p. The true proportion defective in the lot if all units were to be inspected.

See reference 2, Chapter 5, “Testing the Mean of a Binomial Distribution (Acceptance Inspection of a Lot Where Each Unit is Classified Into One of Two Categories)” for additional details.

Example 1 (true p = 0.1)

A test plan is desired that will reject a lot that has a true proportion defective of 0.3, or more and will accept a lot that has a true proportion defective is 0.1, or less. We deisre to demonstrate this level of quality with a consumers risk of 3% and a produces risk of 2%.

To develop a test plan for teh above requirements, all one needs to do is enter this information for inputs 1 – 4, as shown below.  To further demonstrate thie calculator, we will simulate five separate tests where the true proportion is assumed to be 0.10. The tool performs the simulation by using Python’s random number generator to generate test samples that produce, on average, one defect for every to ten samples.  As an alternative, this Excel template could be used to generate simulated defects, which could then be pasted into Box 5B shown below, along with selecting this option for the chart overlay.  Because we defined this as an acceptable defect level, the resulting test simulations should result in most tests reaching an accept decision.  The calculator inputs are highlighted in yellow below.

The resulting simulations are represented by the lines shown between the red (reject) and green (accept) lines shown in the plot below.  All simulated tests reached an accept decision, as expected.  Two simulation reached an accept decision after only 14 units were inspected with no defects found, while another simulation required inspecting 63 units, with 9 defects found, before reaching an accept decision.

The table below summarizes the five simulations.

The tool also outputs a tabulated accept/reject table, as shown below.

The length of the above table and x-axis in the plot is governed by input 5A shown below.  A larger factor will result in more rows listed in the above table.

Example 2 (true p = 0.3)

Instead of a true proportion defective of 0.1 used in the above simulations, this example shows the result if we assume a true proportion defective of 0.3, with all other inputs remaining the same.

The results of the simulation show a reject decision being reached for all simulated tests, as all lines cross the red reject line.

A tabular summary of the simulated test is summarized below.

Note that on average, only 27 units had to be inspected before a decision was reached for both of these examples.

Example 3  (true p = 0.01)

If the defect density is really low, then the test is even more efficient.  For example, for a “true p” is 0.001, the simulated test reach an accept decision after inspecting an average of 20 units, as shown below.

References

1. Bazovsky, Igor, Reliability Theory and Practice.
2. Wald, A., Sequential Analysis.
3. Wald, A. (1945). Sequential tests of statistical hypotheses. Annual Mathematica Statistics. 16, 117-186.
4. MIL-HDBK-781A, Reliability Test Methods, Plans, and Environments for Engineering Development, Qualification, and Production.
5. Epstein, B., & Sobel, M. (1955). Sequential Life Tests in the Exponential Case. The Institute of Mathematical Statistics.