Acceptance sampling plan and Classifier

Michael C.H. Wang
GLInB
Published in
4 min readMay 15, 2022

What is an acceptance sampling plan ?

Originated in ww2 by Dodge and Romig to test bullets, a decision making process by sampling inspection results to accept or reject a receiving lot so called Lot acceptance sampling or simply acceptance sampling. Now widely used in quality control worldwide environment.

There is an Acceptance Quality Limit (AQL) which represents the agreed acceptable percentage defect and LTPD (Lot tolerance percentage defect) which is the least quality customer would not accept. Acceptance sampling plan is a set of protocols to distinguish “OK/NG” lots by sampling inspection results.

Types of sampling plan

There are many sampling plans available from different standard sources. But basically they could be classified into two types :

  1. Attribute sampling plan for “go/no-go” data. Examples are like MIL-STD-105, ANSI Z1.4, CNS 2779, etc. ……
  2. Variable sampling plan for variable data. Examples are like MIL-STD-414, ANSI Z1.9, CNS 9445, etc.……

Will focus on attribute sampling plan to explain the statistical background in below sections.

OC (Operating Characteristic) Curve

The operating characteristic curve shows the discriminatory capability of a sampling plan. The OC curve plots the probabilities of accepting a lot versus fraction defective.

It could be constructed by solving below equations simultaneously for n, the number of samples required, and c, the allowable number of failures to meet the requirement:

1−α=Σci=0(ni)PiAQL(1−PAQL)n−i

β=Σci=0(ni)PiLTPD(1−PLTPD)n−i

where α is the producer’s risk or the probability of failing the inspection if they deliver a product that meets acceptable limit (AQL) , and β is the consumer’s risk or the probability of passing a system if the product actually failes to meet the tolerance (LTPD).

In most cases, organizations care more about if the requirement has been met (minimizing consumer risk) so these curves could be constructed by first solving the consumer’s risk equation for allowable failures ranging from 0 to some fixed number (often no more than 5 -10 because of limited test resources).

An example attached below:

From: https://testscience.org/plan-a-test/plan-a-reliability-test/construct-an-operating-curve/

Practical table approach

By Namazu-tron — Self scan from quick reference card arranged by MOTOROLA semiconductor Products Inc. per MIL STD 105 D, Public Domain, <a href=”https://commons.wikimedia.org/w/index.php?curid=6854695">Link</a>

Sample size code letters

  1. Lot or batch size
  2. General inspection levels (vs. S-1~S-4)

Sampling plans

  1. Sample size
  2. AQL

Ideal sampling plan-reduce both risks as much as possible

Ideal Operating Curve

What is a classifier? (Machine Learning)

A classifier in machine learning is an algorithm that automatically orders or categorizes data into one or more of a set of “classes.” There are some algorithms for this purpose like Support Vector Machines, Decision Tree or Artificial Neural Network.

How to evaluate a Classifier ?

“The terrorists detection tricks” from

Beyond Accuracy : Precision and Recall

In the terrorism case, true positives are correctly identified terrorists, and false negatives would be individuals the model labels as not terrorists that actually were terrorists.

Confusion matrix

What is a “confusion matrix”? And how it looks like?

A confusion matrix for binary classification shows the four different outcomes: true positive, false positive, true negative, and false negative. The actual values form the columns, and the predicted values (labels) form the rows.

Some definition:

Recall/sensitivity: TP/(TP+FN)

Precision: TP/(TP+FP)

Fallout: FP/(FP+TN)

Question: Which one is alpha risk? Which one is beta risk in acceptance sampling plan?

Source: https://link.medium.com/wbhwHLA3dob

Receiver operating curve

Source: https://developers.google.com/machine-learning/crash-course/classification/roc-and-auc
Receiver Operating Characteristic Curve (Source)

The mission of GLInB is to bring most value by virtualization of your supply chain quality function to fit for challenges in today’s business environment.

Please visit us at http://www.glinb.com for more information.

--

--

Michael C.H. Wang
GLInB
Editor for

❤️‍🔥Passionate in blending QA and ML. Enjoying in problem solving.🔍🔧 Co-founder of GLInB. 📝Bio at Michael Chi Hung Wang | LinkedIn