Z1.4 Sample Size

Pharmaceutical sampling


I am trying to determine the sampling size using my ANSI/ASQ Z1.4 table and I wanted to get some clarification. If I am using Table II A and my Sample Size Code letter is D, what would be my sample size? If it falls on an arrow does it mean that I have to change to the next sample size based on where the arrow points?


From Charlie Cianfrani:

If you are using Z1.4, your sample size is selected based on your lot size.  You would pick the AQL you need based on the risk you are willing to take for the process average of percent defective.  It is important to understand what you are doing when using sampling plans, what they are and the protection you are trying to ensure. Thus, the important step is to determine the AQL. Then you select the sample size to provide the level of protection you are striving to ensure. It is more important to understand the theory behind the tables than to mechanically use the tables.

From Fred Schenkelberg:

Use the sample size where the arrow points. In the 2008 and 2013 versions it explains this in section 9.4, “When no sampling plan is available for a given combination of AQL and code letter, the tables direct the user to a different letter. The sample size to be used is given by the new code letter, not by the original letter.”

From Steven Walfish:

The standard sample size for Code Letter D from IIA is a sample size of 8.  But depending on your AQL, a sample size of 8 would be inappropriate, so the standard has arrows to delineate alternative sample sizes to reach the target AQL.  So, you sample size and accept/reject values are changed.  For example, at an AQL of 0.25, you would move down to a sample size of 50, with an accept/reject of 0/1.  If the lot size is less than 50, you would need to do 100% inspection.  In other words, there is no sampling plan that can give an AQL of 0.25 without a minimum sample size of 50.

From James Werner:

Yes.  When using Z1.4 two items need to be known, lot size and the AQL (Acceptance Quality Limit).  You use Table I – Sample size code letters to determine the Sample size code letter based on the Lot or batch size.  In the question below that was determined to be “D”.  Next step is to use Table II-A to find the sample size related to the sample size code letter – D and the AQL.  On Table II-A go across the table’s row for letter D until it intersect the given AQL column heading.  If an arrow is in that intersection point, follow the arrow then go back to the sample size code letter column to find the actual sample size (if a up/down arrow is in there then you choose).

Example 1.  Code letter is D (as in the question below).  Let’s say the AQL is 0.25.  Starting at code letter D, move across that row until you intersect at the AQL 0.25 column.  There’s a down arrow this row/column intersection.  Follow the arrow downward until the “Ac Re” reads ” 0 1″.  Staying on this row go back to the Sample size code letter column and find Code Letter H and Sample size = 50.  This means for the lot size with code letter D and with an AQL of 0.25 the sample size = 50 and accept the entire lot if no nonconformances were found else reject the entire lot if 1 or more nonconformance were found in the sample.

Example 2.  Let’s say the Sample size code letter was determine from Table I to be “F”.  Looking at Table II-A; If the AQL = 0.65, then the sample size would be 20 and the lot would be accepted zero nonconformance.  But if the AQL = 0.15 then the sample size would be 80.

For more information on this topic, please visit ASQ’s website

Acceptance Sampling Inspection

Automotive inspection, TS 16949, IATF 16949


We have an acceptance sampling inspection in place where we use the ANSI/ASQ Z1.4 -2013 standard under Normal Inspection, using General Inspection Level II to drive our samples size and accept, reject criteria. We do not uses switching rules as we have always found them too difficult to manage. I have two questions.

If I have one lot that fails acceptance sampling and I am trying to bound the issue is it suitable to bound it to the one affected lot if the lot before and after pass or do I need to carry out additional sampling.

My second question is if I have a batch that passes acceptance sampling but at a subsequent downstream process a defect being inspected for by the upstream acceptance sampling inspection is found how do I determine if the lot is acceptable? Do I trust the acceptance sampling inspection or react?


The first question is not an uncommon one and actually it is a good practice to isolate the lot and do 100% inspection of it.  That way you can estimate the % defective and if another failure occurs in the next 5 lots, then increase the sampling until you have some confidence that the supplier has fixed the problem.  Once that confidence is restored, then you go back to what you inspected originally.

The second question, is one that you have to understand how well do you follow the acceptance sampling process?  If your alpha level is at 95%, 5% of the time, you can accept a bad batch as good. That is the pure definition of the alpha risk.  If this failure falls within the 5%, your process is working and while you sort through the lot, and notify the supplier, it is not something that you over react to.

I hope this helps.


James Bossert, PhD, MBB, CQA, CQE, CqM/OE
Sr Performance Improvement Consultant

For more on this topic, please visit ASQ’s website.

Switching Rules

Manufacturing, inspection, exclusions


We are planning to implement ANSI/ASQ Z1.4-2003(R2013) sampling inspection plan with our Finish products which are currently 100% inspected by QC Inspectors.  I read  about the importance of the switching rules  on a continuing stream of lots and have the following  questions:
1.Is it acceptable to select a specific plan (tightened, normal or reduced ) and use it without the switching rules?
2.Are there any exceptions which allow us to use a specific plan without applying  the switching rules?


  1. You can use any plan without using the switching rules but it does run the risk of not meeting the alpha risk in the end. These plans were developed to be used as documented. A normal plan is generally used and the switching rules come in when the clearance number has been obtained.  Some processes may never switch.  If you choose a plan that is tightened or reduced to start with, you potentially will either spend too much on inspection (tightened) or risk having bad product go to the customer (reduced).  It is a business decision for you to make if your customer is not demanding it.  The switching rules are there to protect the producer when the product is running very well or it has problems.
  2. If your customer is not requiring a particular plan, you can use what you want. It is a business decision, no reason for any exceptions.

I hope this helps.

Jim Bossert
Sr Performance Improvement Specialist
JPS Hospital
Fort Worth, TX

For more about this topic, please visit ASQ’s website.

Sample Size and Z1.4

Data review, data analysis, data migration


My question is if I’m trying to determine the sample size of migrated data to see if it migrated correctly to the target database, is the Z1.4 table applicable to that?

The scenario is data is being transferred from an old system to a new system and I want to do a quality check on the data in the new database to make sure everything was transferred correctly. I’m hoping to use the Z1.4 table to determine the sample size if its applicable. Is it applicable and if not, do you know of other standards that I should be looking into that is more applicable?


The movement of a database from one system to another certainly may introduce errors and it may also carry over errors that already exist. In some cases the move may also find and repair errors, yet that generally is done by design.

So, let’s say it’s just a move and you are checking for any new errors that are introduced.

Since you have access to the entire population, the database, in a before (old system) and after the move (new system) and I’m assuming you do not want to check every entry, instead just a sample, then I would recommend using an hypothesis test approach rather than a lot sampling approach.

A hypothesis test based on the binomial distribution may be appropriate as you are checking field entries to determine if they are correct or not (pass/fail).

You can set a threshold defect rate that you want to check the new system is at least this good or better, or you can measure the old system and compare to the new system – it should be equal to the old system as null hypothesis.

You can find a bit more information about a p-test in a good stats book or online at a short tutorial I wrote at https://creprep.wordpress.com/2013/06/01/hypothesis-tests-for-proportion/

The Z1.4 standard would require you to artificially define a lot or consider the entire database as one lot. The standard lot testing approach does not provide the control and statistical power of hypothesis testing, thus my recommendation. With the p-test you can define the confidence, defect rate to detect, and sample size to fit your needs concerning ability to make measurements, cost, and risk.



Fred Schenkelberg
Reliability Engineering and Management Consultant
FMS Reliability
(408) 710-8248

For more on this topic, please visit ASQ’s website.

Sample Size

Manufacturing, inspection, exclusions


If we have a lot size of 27 and we are using a normal inspection level II with an AQL of 2.5. What is the sample size?


Assuming an attribute is being measured, we use ANSI ASQ Z1.4.2013 to find the sample size.

Given a lot size of 27 we first find in Table I. Sample Size Code Letter that Code letter D represents the sampling plan code letter for lot sizes between 26 and 50 for normal sampling (General Inspection Level II).

The move to Table II-A Single sampling plans for normal inspection to find the row for code letter D and under column for ASQ 2.5 find an up arrow. This indicates that we should use the code letter C which suggests a sampling plan of 5 samples and accept the lot if there are zero defect and reject the lot with one or more rejects.

Hope that helps.



Fred Schenkelberg
Reliability Engineering and Management Consultant
FMS Reliability
(408) 710-8248

For more on this topic, please visit ASQ’s website.

Switch from ANSI/ASQ Z1.9 to ANSI/ASQ Z1.4?

PLCs, programmable logic controllers



We are using ANSI Z1.9 for a dimension test of packaging components. As dimension is under variable, can we switch to ANSI Z1.4? The reason for this is to align with our supplier who is using ANSI Z1.4.

Can you please advise if this switching is acceptable. If yes, what should be taken into consideration like AQL, etc.?


The ANSI/ASQ Z1.4 standard is for incoming inspection of attribute characteristics.  As your measurement is a variable measurement, it is appropriate to use ANSI/ASQ Z1.9.  Both plans are indexed by AQL, but have different sample size requirements based on the level of protection you are looking to maintain.  I assume your real question is can you switch from a variable plan (Z1.9) to an attribute plan (Z1.4) for your inspection to align with your supplier’s use of Z1.4.   Though I do not believe harmonizing with the supplier’s use of Z1.4 for your acceptance testing is necessary, it is possible to use Z1.4 by redefining the variable measurements as either good or no-good.  Choosing to move to Z1.4 from Z1.9 will increase your sample size for the same level of protection and same lot size.  For example, a lot size of 5000 would have a sample size of 75 in Z1.4 and 200 for Z1.4 for a General Inspection Level II plan.  Both plans give approximately the same AQL and LTPD, though the Z1.4 will require 2.67x more samples.

Steven Walfish
Chair Z1, U.S. TAG to ISO/TC 69
Staff Statistician, BD

For more about this topic, please visit ASQ’s website.

Z1.4: 2008 Sampling


Sterile, Lab, Clean Room, Requirements, Standard


We are having an interpretation issue regarding the ANSI/ASQ Z1.4:2008 standard with some of our component vendors. We have a number of different defects that fall into an AQL of 1.0.

Please note that the same question applies to all AQL levels, as our critical and minor defects can also have multiple defects.

Our interpretation of the standard is that if the sampling plan table (based on sample size and inspection level) shows Accept 7 / Reject 8 then all defects in this major category would be cumulative for the accept / reject criteria. (i.e. 3 that fail outer diameter, 3 that fail height of the bottle finish and 3 that fail weight – total of 9 – would constitute a rejection of the lot). The vendor’s interpretation is that each of the items within the major category should have an accept / reject allowance of 7 / 8 (so potentially, in this case, 56 defects would still be accepted).


In this case, it depends on the question the lot sampling is trying to answer. If they want to know if individual units within the lot are acceptable – based on all criteria that is considered acceptable, then the tally of all defects found is correct. This is further supported by any item with one of the many specifications out of range would be deemed a failure.

On the other hand, if the lot sampling is to detect lots with specific faults, isolated to a specific specification then the defect types would be considered separately. If the AQL 1.0 is suitable for the specific defects, then considering them separate for the 8 criteria would no longer be an overall ASQ 1.0 protection; it would be much less.

Your example of 56 defects being accepted underscores the point that the AQL protection is no longer 1.0.

I’m assuming the specifications and causes of the defects are independent, yet that may not be the case. When not independent I’m not sure how to adjust the sample size to a present the same AQL protection. When independent you would need separate draws of samples for each defect of interest, then apply the Accept 7/Reject 8 criteria judging only the one specification.

In practice, if you want to inspect for isolated specifications, one should allocate the acceptable AQL and LPTD points and develop your sampling plan from there. Instead of a 1.0% defect rate for AQL it would need to less for one of the Reject 8 specifications; try 0.125 so that the tally of failure rates across the various specification of interest (assuming the possibility of failing any specifications is equal). This will lead to much larger sample sizes that may be useful when troubleshooting specific faults.


For more on this topic, please visit ASQ’s website.

Z1.4: Selecting the Sample Size

Pharmaceutical sampling

Q: I work for a pharmaceutical company that manufactures soft gel capsules. What is the proper way to select a sample size when using ANSI/ASQ Z1.4-2008: Sampling Procedures and Tables for Inspection by Attributes?

I’ll further illustrate my question with an example.  If one were to have a batch size of 20,000 units, according to General Inspection Level II, Normal, the corresponding letter code is “M.” In the master table for Acceptable Quality Levels (AQLs), the sample size would be 315 units.  If my AQL is 0.010 (with an acceptance/rejection number of 0/1 based on the table), does my sample size change to 1250 units? Or does it remain at 315 units?

Your assistance is greatly appreciated.

A: The simple answer is 1250, not 315 suggested for sample size letter M.  General Inspection Level II, Normal, shows that for a lot size of 20,000, a sample size code level of M corresponds to a sample size of 315.  For an AQL of 0.01, the arrow points to a sample size of 1250 (sample size letter code Q) to have the required AQL of 0.01.

The calculation of AQL is not dependent on lot size.  In other words, a sample size of 315 gives a minimum AQL of 0.04, so a larger sample is required to estimate an AQL of 0.01.

Q2: Could you please add another layer to your response? The reason I’m seeking additional clarification is that the first step in determining the sample size is to find the letter code and the corresponding sample size. To me, it feels like the first step should be to determine the AQL.

A2: Let me expand with a more technical explanation.  Attribute sampling is based on the hypergeometric distribution and is estimated using the binomial distribution (which assumes an infinite population size).

The basic formula for the binomial is:

2.1.2013 1

AQL and LQ for a given sample size (n) and defects allowed (x): 2.1.2013 2

If n=30, x=0; AQL=0.17%; LQ=7.4%:

2.1.2013 3

2.1.2013 4

If you are using Z1.4, your sample size is selected based on your lot size.  Then, you would pick the AQL you need based on the risk you are willing to take for the process average of percent defective.  If you decide to not use Z1.4, but instead use the binomial directly, then you are correct that you would decide on the AQL and lot tolerance proportion defective (LTPD) first, then calculate a sample size for c=0, c=1, c=2, and etc.

Steven Walfish
Secretary, U.S. TAG to ISO/TC 69
Principal Statistician, BD

Related Content:

Acceptance Sampling With Rectification When Inspection Errors Are Present, Journal of Quality Technology

Zero Defect Sampling, World Conference on Quality and Improvement, open access

Explore ASQ’s website for more case studies, articles, benchmarking reports, and other content about zero defect sampling.

Combating Contamination

Workplace safety, OHSAS 18001, work environments

Q: We want to ensure that we are receiving clean containers to package our products. How can we improve our incoming inspection process?

A: You should encourage your vendor to ship only clean containers. Then, be sure that the shipping and receiving process doesn’t cause contamination. If you can determine the source or sources of the contamination, the best fix is to remove the cause.

If that approach is not possible and you have incoming containers that may have some contamination, then consider the following elements in creating an efficient incoming inspection process.

1) How do you detect the contamination?

Apparently, you are able detect the container contamination prior to filling them, or are able to detect the effect of the contamination on the final product. Given that you are interested in creating an incoming test, let’s assume you have one or more ways to detect faulty units.

As you may already know, there are many ways to detect contamination. Some are faster than others, and some are non-destructive. Ideally, a quick non-destructive test would permit you to inspect every unit and to divert faulty units to a cleaning process. If the testing has to be destructive, then you’ll have to consider lot sampling of some sort.

There are many testing options. One is the optical inspection technique, which may find gross discoloration or large debris effectively. Avoid using human inspectors unless it’s only a short term solution, as we humans are pretty poor visual inspectors.

Another approach is using light to illuminate the contamination, such as a black light (UVA). Depending on the nature and properties of the contamination, you may be able to find a suitable light to quickly spot units with problems.

Another approach, which is more time consuming, is conducting a chemical swab or solution rinse and a chemical analysis to find evidence of contamination. If the contamination is volatile, you might be able to use air to “rinse” the unit and conduct the analysis. This chemical approach may require specialized equipment. Depending on how fast the testing occurs, this approach may or may not be suitable for 100 percent screening.

There may be other approaches for detecting the faulty units, yet without more information about the nature and variety of contamination, it’s difficult to make a recommendation. Ideally, a very fast, effective and non-destructive inspection method is preferred over a slow, error prone, and destructive approach. Cost is also a consideration, since any testing will increase the production costs. Finding the right balance around these considerations is highly dependent on the nature of the issue, cost of failure, and local resources.

2) How many units do you have to inspect?

Ideally, the sample size is zero as you would first find and eliminate the source of the problem. If that is not possible or practical, then 100 percent inspection using a quick, inexpensive, and effective method permits you to avoid uncertainties with sampling.

If the inspection method requires lot sampling, then all of the basic lot sampling guidelines apply. There are many references available that will assist you in the selection of an appropriate sampling plan based on your desired sampling risk tolerance levels.

Another consideration is the percentage of contaminated units per lot. If there is a consistent low failure rate per lot, then lot sampling may require relatively large amounts of tested units. You’ll have to determine the level of bad units permitted to pass through to production. Short of 100 percent sampling, it’s difficult (and expensive) to find very low percentages of “bad” units in a lot using destructive testing.

3) Work to remove original source(s) of contamination to permit you to stop inspections.

I stress this approach because it’s the most cost effective in nearly all cases. In my opinion, incoming inspection should be stopped as soon as possible since the process to create, ship and receive components should not introduce contamination and require incoming inspection to “sort” the good from the bad.

Fred Schenkelberg
Voting member of U.S. TAG to ISO/TC 56 on Reliability
Voting member of U.S. TAG to ISO/TC 69 on Applications of Statistical Methods
Reliability Engineering and Management Consultant
FMS Reliability

For more on this topic, please visit ASQ’s website.

Z1.4 Split Sampling

Chemistry, micro testing, chemical analysis, sampling

Q: I have two questions about Z1.4-2008: Sampling Procedures and Tables for Inspection by Attributes.

1. Does the plan allow one to “split” sampling plans among multiple items, or is only one item per plan intended?

2. The plan states a 95% confidence level, which means the findings of the sampling will statistically show that the findings (or number of defects) will be consistent with the findings of the entire inspected lot. So, if we split the sampling, how can you determine what happens to the confidence level?

A: Thank you for submitting your question to ASQ’s Ask the Experts Program. Answers to your inquiries follow.

1. In attempting to answer any given question, one needs to understand the question with respect to its gist and terms used.

Z1.4 uses the term “unit” to represent an individual “product” entity (unit here can represent a discrete fairly simple product, such as a bolt or nut), or it can represent a complex product (such as a computer, or a large piece of machinery, or even a square meter of cloth or other material, a length of wire or other material, etc.).

It is assumed here that the use of the term “item” in the question refers to a “unit.” It might, however, refer to a quality characteristic, and the explanation given here will attempt to explain either case.

Now, units can have a single principal quality characteristic or they can have many different quality characteristics.

Z1.4 allows for some of these quality characteristics to be of greater importance (severity for example, with respect to quality and/or economic effects) than others, whereby separate sampling is applied to each group with different sampling parameters (such as sample size, acceptance number, lot size). Hence, units with a single quality characteristic can be checked by sampling via Z1.4 and units with multiple quality characteristics can be checked by sampling via Z1.4.

In each case, the chosen Acceptable Quality Limit (AQL) and what it stands for applies to whatever is included in the inspection made on each unit. It is also assumed that this separate handling of units and quality characteristics is what the question means with respect to the term “split.”

Furthermore, it should also be understood that sampling inspection can be conducted with respect to two distinctly different statistics. One is the number of nonconforming units found in the sample. These are sometimes referred to as “defectives.” The second is the number (sum) of nonconformities found on all units in the sample, where any given single unit can have multiple nonconformities. These are often referred to as “defects.”

A “nonconforming unit” is defined as a unit with one or more nonconformities (defects) — but counted only as one “defective” unit. A “nonconformity” is any departure for any quality characteristic being considered in the inspection of each unit. In Z1.4, one can use either statistic as desired. The choice is largely dependent on the nature of product units and the reason for doing the sampling inspection — whether it is to control or oversee defective units or to control or oversee defects.

In the tables of Z1.4, note the top line above the range of AQLs: “Acceptance Quality Limits (AQLs), Percent Nonconforming Items and Nonconformities per 100 Items”. It should also be pointed out that Z1.4 is intended to be a sampling scheme or system, not just a selection of a given sampling plan. Please review the standard and any number of excellent books available on sampling inspection covering Z1.4, ISO 2859, and etc.

2. If one examines the Z1.4 standard from cover to cover, one will not encounter the term “confidence level.” Z1.4 contains no confidence intervals (or levels) related to any of its features.

Furthermore, the 95% figure is a very general figure associated with the expected “probability of acceptance” at the designated (selected) AQL. This is NOT a confidence level! In fact, the AQL is NOT a statistic!

Setting an AQL is generally an agreement/negotiation process between the customer and supplier. It is more of an index. Essentially, it refers to a level of nonconformity that is generally “acceptable” — a value of 0 being desired of course — but otherwise, a compromise figure.

And it is not by any means a constant, as can be seen by examining the Operating Characteristic (OC) Curves for the various code letters A through R using the same AQL in every table.

For example, for an AQL of 2.5% with the code letter C plan, incoming quality p must be 1.03% for Pa to be 95%, and Pa at 2.5% is less than 90%; for the code letter F plan, p must be 1.80% for Pa to be 95% and Pa at 2.5% is between 90% and 95%, etc.

If confidence intervals at chosen levels are desired for any given sampling plan, one most resort to the theory and methodologies of statistical inference with the available information provided by the sample statistics.

Kenneth Stephens
ASQ Fellow
ASQ Quality Press Author

For more on this topic, please visit ASQ’s website.