Inspection by Attributes
A sampling plan does not measure quality. It sorts lots, and the OC curve says how well.
— units
ISO 2859-1 code letter for this lot size and level
The sample size comes from the ISO 2859-1 general inspection level code letters, with Level I and Level III taken as one code letter either side of Level II - which is how the general levels are laid out in Table 1. Special levels S-1 to S-4, used for destructive or expensive tests, are not covered and must be taken from the standard. The acceptance number is an input, not a lookup: Table 2-A contains arrow cells that redirect to a different sample size, and reproducing those without the table in front of you is how plans get misquoted. The operating characteristic is exact binomial for a single sampling plan under normal inspection; double, multiple and sequential plans have different curves. Where the sample would exceed the lot it is capped at the lot size, which is 100% inspection. Switching rules between normal, tightened and reduced inspection are a separate mechanism and change the effective protection substantially.
Statistical Sampling Plan, OC Curve & Average Outgoing Quality — free, with the formula and a worked example, at Textile School.