Professional Documents
Culture Documents
Sampling Plans
that Result in
Statistical Confidence
Raul Soto, MSc, CQE
IVT Conference - March 2017
Amsterdam, Netherlands
The contents of this presentation represent the opinion of the
speaker; and not necessarily that of his present or past
employers.
• High-speed, high-volume automated manufacturing and packaging equipment; machine vision systems
• Manufacturing Execution Systems (MES)
• Enterprise resource planning applications (i.e. SAP)
• IT network infrastructure, reporting systems, Enterprise applications
• Laboratory information systems and instruments
• Mobile apps
• Product improvements, material changes, vendor changes
• Contact information:
• Raul Soto rsoto21@gmail.com
3
What this talk is about
• Present the fundamental concepts of
Acceptance Sampling
• OC Curves
• Quality Indices: AQL and LQ (LTPD)
• Sampling by Attributes
• Single and Double plans
• Sampling by Variables
3.RANDOMIZE
• Units selected for inspection must be selected at random.
• Every single unit in your lot must have the SAME probability to be selected as
a sample.
• If this condition is not met, your sample will be biased and your sampling
decisions will be WRONG.
FUNDAMENTALS
WHAT IS SAMPLING /WHEN TO USE IT / OC CURVES /
AQLS AND LQS
Fundamentals
• Sampling helps us to :
• Improve the quality level of the product going out to the customer
• Protect us against the release of highly defective lots
1. No inspection
• PAT, Parametric Release
2. Small samples
• Stable processes, homogeneous product
3. Large samples
• Validation, new products, processes with large variation
4. 100% Inspection
• When there is a cost-effective alternative (i.e. automation), or when sampling
determines a very high % defective
• Acceptance sampling does NOT improve the quality of our manufacturing processes.
• The only way to provide 100% good product is to make 100% good product.
• Neither statistical sampling, nor 100% inspection, can guarantee that you will find every
defect on a lot.
• The risk of rejecting a good lot = alpha (a) risk / error (Producer’s Risk)
• Represented by AQL
• The risk of accepting a bad lot = beta (b) risk / error (Consumer’s Risk)
• Represented by LQ / RQ / LTPD
Accept or Reject?
• Lot A: 0.9 % defective _________________
• Lot B: 1.0 % defective _________________
• Lot C: 1.1 % defective _________________
• Lot D: 2.0 % defective _________________
• Lot E: 3.2 % defective _________________
• Lot F: 5.0 % defective _________________
• Lots with a % defective equal or lower than the AQL have a probability of
acceptance of 95% or better.
• Lots with a % defective equal or higher than the LQ10 have a probability of
acceptance of 10% or less.
• Lots with a % defective between the AQL and the LQ10 have a probability of
acceptance between 10 – 95%.
• Type B:
• Assumes that the sample came from a large lot, where the effect of removing a sample has negligible
effect. (Lot size / sample size > 10)
• To know this, you need to know the AQL, the LQ, and the OC Curve.
IVT Amsterdam MAR2017 (c) 2017 Raul Soto 22
Why is AQL not enough?
• These 4 sampling plans have
AQL ≈ 1% but different LQ10.
• They provide equivalent
protection to the producer, but
different levels of protection to
the consumer.
Plan AQL IQ LQ10
n = 132, a = 3 1.0% 2.8% 5.01%
• LQs for validating new processes or process changes should be smaller than for regular
manufacturing with mature processes.
• Depends on severity of a failure: critical / major / minor / cosmetic
• Your company’s Quality Engineering standards should have target quality levels based on severity.
• Main driver should always be the protection of patient safety.
IVT Amsterdam MAR2017 (c) 2017 Raul Soto 24
Attributes vs Variables Data
• Attributes data
• Variables data
Double
• lots inspected and decision to accept / reject is based on a maximum of two samples
• More complex to design and implement
• Smaller sample sizes in the long run = more economically efficient
Multiple
• decision to accept / reject is based on maximum of seven samples (out of scope for this talk)
• Most complex to design and implement
• Fewer sampling, most economically efficient
• Looks too much like “sampling until you pass”
• Example:
• This means that we will take a random sample of 89 units from the lot, and inspect them;
if the number of observed defectives is less than or equal to 2, the lot will be accepted.
• In attributes sampling plans, each inspected unit is judged as either conforming or nonconforming.
• The OC Curve allows us to see the level of protection provided by a sampling plan
• In this case, since N/n >10, we can use the binomial distribution to construct the OC Curve
89!
Pa P{x 2} (0.01) 0 (0.99)89
0!*89!
89! 89!
(0.01)1 (0.99)88 (0.01) 2 (0.99)87 0.9397
1!*88! 2!*87!
0.95
0.9
0.8
OC Curve % Defective
po
Probability of
Acceptance
Pa
0.7
0.005 0.9897
0.6 0.010 0.9397
0.020 0.7366
0.5
0.5
0.030 0.4985
0.4
0.040 0.3042
0.3 0.050 0.1721
0.060 0.0919
0.2 AQL LQ10
0.070 0.0468
0.1
0.10 0.080 0.0230
0 0.090 0.0109
0 2 4 6 8 10 12 14 16 18
percent defective
• The protection of this plan (n = 89, a = 2) can be interpreted from the OC curve as follows:
• Increasing the sample size n increases the precision of the plan, its ability to
discriminate between good and bad lots. (Steeper OC curve)
• Decreasing the acceptance number a shifts the OC curve to the left, also increasing
the protection of the plan.
• When a = 0, the OC curve is convex.
• The lot size does not have a significant effect on the OC curve unless the sample size
is large (N/n < 10)
85% with n = 30
65% with n = 60
40% with n = 100
• Sometimes the sample size is set as a fixed percentage of the lot size (for example, sampling 10% of every
lot).
• Another common practice is to set the sample size as the square root of the lot size.
• The problem with these method is that they do not provide a consistent protection, since the sample
size will vary as the lot size varies.
• You still need to know your plan’s AQLs and LTPDs. Remember, you should ALWAYS know what your
sampling plans routinely accept and routinely reject.
N = 1000
Inconsistent protection
N = 2000 Larger lots get better protection than
smaller lots
N = 5000
Inconsistent protection
Larger lots get better protection than
smaller lots
• The maximum value of the AOQ is the Average Outgoing Quality Limit, AOQL
AOQL = 1.47%
1.4
1.2
• 100% inspection of
rejected lots
Average Outgoing Quality AOQ
0
0 1 2 3 4 5 6 7
percent defective p
• Using an acceptance number (a = 0) on a sampling plan does NOT guarantee zero defects.
• An a = 0 sampling plan is NOT a tool to drive a process to zero defects; all you achieve is to
reject more product.
• Zero defects can only be achieved by eliminating the problems that cause defects, NOT by
sampling.
• For critical defects with major impact to patient safety it is necessary to keep the lowest AQL
possible. In this case, a large sample with an accept number of 0 is the most appropriate
alternative.
• In these cases, we must be aware of the cost of implementing such a plan, vs the cost of releasing a
critical defect to the market. For medical devices/ biopharma, the safety of the customer must be
the most important consideration.
• For non-critical defects: Non-zero defects plan with equivalent LTPD, slightly higher AQL
Pa% Index p
95 AQL 0.1025349
90 0.2104967
50 IQ 1.3767280
10 LTPD10 4.5007420
5 LTPD5 5.8155100
NEARLY EQUIVALENT TO
n = 85 a = 1
Pa% Index p
95 AQL 0.4196731
90 0.6274016
50 IQ 1.9666710
10 LTPD10 4.4990580
5 LTPD5 5.4596020
0 ≥4
#
Accept Reject
defects
1-3
≤3 ≥4
Total #
Accept Reject
defects
AOQL = 1.47%
AOQL = 1.42%
AQL Pa (double)
0.9 • Single sampling plan
Pa (single)
• n = 132, a = 3
0.8
• Double sampling plan
0.7 • n1 = 60, a1 = 0, r = 4
Probability of Acceptance (Pa)
• n2 = 82, a2 = 3
0.6
0.5
p Pa (double) Pa (single)
0 1 1
0.4
0.65 0.9871363 0.9888251
LQ10 1.3 0.8952717 0.905678
0.3
1.95 0.7228923 0.7425666
2.6 0.5279285 0.5501373
0.2 3.25 0.3570842 0.3751051
3.9 0.2284081 0.2392301
0.1 4.55 0.1405285 0.1445002
5.2 0.08433088 0.08343898
0 5.85 0.04993715 0.04638324
0 1 2 3 4 5 6 7 6.5 0.02946017 0.02495489
percent defective p
IVT Amsterdam MAR2017 (c) 2017 Raul Soto 50
Using Minitab
• Stats / Quality Tools/ Acceptance Sampling by Attributes
Generated Plan(s)
Sample Size 52
Acceptance Number 2
BINOM.INV (sample size, AQL, alpha) = returns the minimum acceptance number for given AQL
BINOM.INV (sample size, LTPD, beta) = returns the minimum rejection number for given LTPD
HYPGEOM.DIST (acceptance number, sample size, % defective, lot size) = Returns the probability of
acceptance Pa
• Generally based on sample mean and sample standard deviation of the quality
characteristic.
• Advantages
• The same OC Curve can be obtained with a smaller sample size than with an
attributes sampling plan. (The same protection with smaller sample sizes).
• Measurements data usually provide more information about the process than
attributes data.
• Disadvantages
• Separate sampling plans must be used for each quality characteristic of interest.
• It is possible to reject a lot even though the actual sample does not contain any
defective items.
• Since the sample mean is larger than the acceptance criteria, the lot is accepted.
• Since the sample mean does not satisfy the acceptance criteria, the lot
is rejected
• Attributes:
• n = 132, a = 3
• Using a variables sampling plan can provide equivalent levels of protection with a much smaller sample
size.
IVT Amsterdam MAR2017 (c) 2017 Raul Soto 64
Normality Assumption
• The normality of the quality characteristic of interest must be tested before using a variables
sampling plan.
Ghasemi A, Zahediasl S. Normality Tests for Statistical Analysis:
A Guide for Non-Statisticians.
• Typical tests for normality: Int J Endocrinol Metab. 2012;10(2):486-9. DOI: 10.5812/ijem.3505
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3693611/
• Visual methods:
• Histograms, P-P plots (probability-probability), Q-Q plots (quartile-quartile)
• Normality tests:
• Kolmogorov-Smirnov (KS), Lilliefors-corrected KS, Shapiro-Wilk test, Anderson-Darling,
Cramer-von Mises, D’Agostino skewness test, Anscombe-Glynn kurtosis test, D’Agostino-
Pearson omnibus test, Jarque-Bera test.
• KS is frequently used, highly sensitive to extreme values
• Some researches consider the Shapiro-Wilk (SW) test as the best choice
• Minitab includes AD, KS, and Ryan-Joiner which is similar to SW.
• For some processes the quality characteristic we want to measure does not follow a
normal distribution
• Alternatives: transform the data (for example, take a natural logarithm) and check if
the transformed data is normally distributed
• If the mean of the quality characteristic varies from lot to lot, a variables sampling
plan will overestimate the variability and will probably reject good lots.
• Variables sampling plans do not react well when a process has outliers or short
periods of highly defective products.
Generated Plan(s)
Sample Size 20
Critical Distance (k Value) 1.73910
Maximum Standard Deviation (MSD) 0.244685
NORM.S.DIST (z)
Returns the standard normal cumulative distribution (has a mean of zero and a standard deviation of one)
NORM.S.INV (probability)
Returns the inverse of the standard normal cumulative distribution (has a mean of zero and a standard
deviation of one)
• Most commonly used sampling system in the world… and a lot of people are using it
WRONG.
• It is NOT intended to be a table of sampling plans from where you can pick the one
you want… but that’s how a lot of people use it.
• It also contains OC Curves, percentiles, ASN curves, and AOQLs for these plans.
• Z1.4 includes reduced, normal, and tightened sampling plans, and a set of switching
rules
• If we are NOT using the switching rules, we can’t state we are inspecting as per
ASQ z1.4
• Section 11.6.2
“Threeinspection levels: I, II, III, are given in Table I for general use. Normally, Inspection
Level II is used. However, Inspection Level I may be used when less discrimination is
needed, or Level III may be used for greater discrimination”
“Four additional Special levels, S-1, S-2, S-3, and S-4, are given in the same table, and may
be used where relatively small sample sizes are necessary, and large sampling risks can
or must be tolerated.”
• Increasing the Inspection Level basically increases the sampling size letter code.
• Decrease LTPD
• Z1.4 changes the plan as the lot size increases, NOT to maintain a constant level of
protection, but instead to give MORE protection to larger lots.
• Alternatives:
• Use the largest lot size to select a plan, then inspect all lots using the same plan
• Reduced
•If ten (10) consecutive lots pass the Normal inspection, move to Reduced
•If one (1) lot fails reduced inspection, move back to Normal
• Tightened
•If two (2) out of five (5) lots fail Normal, move to Tightened
•If five (5) consecutive lots pass Tightened, move back to Normal
• For 3, 4, or 5 defects fond in the sample, accept the lot but switch to Normal inspection.
• For 6 or more defects, reject the lot and switch to Normal inspection
• Disadvantages
• Bad protection during periods of changing quality.
• No protection against isolated bad quality batches or first batch in a run of bad
ones.
• More complex to administer
• Also has normal, reduced and tightened plans, with similar switching rules
z1.9 (2003)
z1.4 (1972)
z1.9 (2003)
• Known variability
•Individual spec (LSL or USL) p.80
•Double spec (LSL and USL) p. 88
IVT Amsterdam MAR2017 (c) 2017 Raul Soto 92
Z1.9 Tables
• AQL represents your Producer’s Risk, quantifies what your plan routinely accepts.
• LQ represents your Consumer’s Risk, quantifies what your plan routinely rejects.
• Sample size has the most significant effect on the protection offered by a sampling plan.
• Knowing the AQL and LTPD of all our sampling plans allows us to know the level of protection they
offer.
2. Flaig, John. “Does c = 0 Sampling Really Save Money?” Quality Digest (2013): n. pag. Web. https://www.qualitydigest.com/print/23830
3. Ghasemi A, Zahedias S. Normality Tests for Statistical Analysis: A Guide for Non-Statisticians. Int J Endocrinol Metab. 2012;10(2):486-9.
DOI: 10.5812/ijem.3505 http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3693611/
4. Gojanovic, Tony. "Back to Basics: Zero Defect Sampling." ASQ Quality Progress (2007): n. pag. Web. http://asq.org/quality-
progress/2007/11/basic-quality/zero-defect-sampling.html
5. Niles, Kim. "Sample Wise: Settling on a Suitable Sample Size for Your Project Is Half the Battle." ASQ Quality Progress (2009): n. pag.
Web. http://asq.org/quality-progress/2009/05/back-to-basics/sample-wise.html
6. Schilling, Edward G., and Dean V. Neubauer. Acceptance Sampling in Quality Control. Boca Raton: CRC, 2009. Print.
https://www.crcpress.com/Acceptance-Sampling-in-Quality-Control-Second-Edition/Schilling-Neubauer/p/book/9781584889526
7. Taylor, Wayne A. Guide to Acceptance Sampling. Lake Villa, IL: Taylor Enterprises, 1992. Print.
8. Taylor, Wayne. "Article - "Acceptance Sampling Update" N.p., n.d. Web. http://www.variation.com/techlib/as-9.html
9. Taylor, Wayne. "Article - "The Effect of Lot Size" N.p., n.d. Web. http://www.variation.com/techlib/as-3.html
10. Taylor, Wayne. "Article - "Statistically Valid Sampling Plans" N.p., n.d. Web. http://www.variation.com/techlib/as-2.html
11. "What Kinds of Lot Acceptance Sampling Plans (LASPs) Are There?" NIST Engineering Standards Handbook Section 6.2.2, n.d. Web.
http://itl.nist.gov/div898/handbook/pmc/section2/pmc22.htm