Sampling – Statistical & GMP Sampling Plans
This topic is part of the SG Systems Global regulatory & operations glossary.
Updated October 2025 • Risk-Based Quality & Release • QA, QC, Manufacturing, Warehouse
Sampling is the disciplined selection of units from a defined population to make defensible decisions about identity, quality, and fitness for use. In regulated operations, “disciplined” means statistical validity and GMP control at the same time: plans are pre-approved under Document Control, selection is randomized and traceable, results are attributable with audit trails, and material status flips in WMS/MES/LIMS based on evidence—never on hunches. Attribute sampling (accept/reject) and variable sampling (measured values) both have a place, but the non‑negotiables are the same: clear population, unbiased selection, right sample size, and decisions recorded under 21 CFR Part 11/Annex 11 with full Data Integrity.
“Sampling isn’t a workaround for full testing; it’s a contract with risk. You earn the right to test less only if you select well, size correctly, and block bad lots from escaping.”
1) What Sampling Really Means in GMP Operations
Sampling is a chain of decisions backed by statistics and systems. First, define the population (e.g., a supplier lot of 200 drums, a shift’s worth of filled vials, a palletized SSCC container). Second, define acceptance criteria (attribute defects allowed or variable limits). Third, choose the plan (randomization method, sample size, acceptance number or variable test). Fourth, execute with identity control, calibrated instruments, and traceable containers. Finally, decide and post status to the operational systems so movement, batching, and shipments obey the outcome. Anything less turns “sampling” into theater.
2) Where Sampling Lives Across the Lifecycle
- Receiving: Create samples on Goods Receipt with Incoming Inspection plans (identity, appearance, AQL-based attributes); set lots to Quarantine until disposition.
- Manufacturing: In-line IPC samples for weight, torque, pH, or viscosity feed SPC charts and hard stops in MES.
- Laboratory: Samples accessioned in LIMS for chemistry (e.g., HPLC) and micro; retain and trend under Data Integrity rules.
- Packaging & Labeling: Label and barcode verification samples at start-up and frequency checks; non-reads or mismatches tie to Label Verification holds.
- Storage & Distribution: Environmental and visual samples; when cold-chain excursions occur, sample-based decisions drive Finished Goods Release outcomes.
- Post-Release Trending: Pulls for stability or complaint investigations feed CPV and the APR.
3) Attribute vs. Variable Sampling (and When to Use Each)
Attribute sampling classifies each inspected unit as conforming/nonconforming to a discrete requirement (e.g., label present, seal intact). Plans are typically specified by an inspection level, a sample size n, and an acceptance number c—accept the lot if observed defects ≤ c. Attribute plans are simple and powerful for visual checks, labeling, packaging, and surface defects.
Variable sampling uses measured values against numeric specifications (assay %, torque N·cm, weight g). With validated measurement systems (MSA), variable plans require smaller sample sizes for the same decision risks because they use the full information in the data (means and variation). Variable plans also feed continuous control via SPC and process capability analysis.
Rule of thumb: Use attribute plans for discrete go/no-go features and for supplier conformance checks; use variable plans whenever you are already measuring a critical quantitative characteristic and have an adequate MSA.
4) The Math in Plain English—Risks, OC Curves, and Sample Size
All sampling plans balance two risks: producer’s risk (rejecting good lots) and consumer’s risk (accepting bad lots). The Operating Characteristic (OC) curve shows the probability of accepting a lot as a function of its true quality level. You tune the plan—sample size and acceptance number, or variable limits—so the curve meets your risk appetite. Small tweaks can have large effects: lowering c by one can slash consumer risk at the cost of more rejections.
Finite populations: For limited lot sizes, hypergeometric logic applies; the effective sample size increases as you sample without replacement. Practically, when the lot is small, you either sample a large fraction or do 100% inspection for critical characteristics.
Destructive tests: If testing destroys the unit (e.g., sterility, seal burst), sample size must account for cost and safety. Often you supplement attribute decisions with variable controls upstream to reduce destructive sample sizes while maintaining risk targets.
Measurement uncertainty: Variable plans assume trustworthy measurements. If MSA shows excessive bias/GR&R, either fix the system or choose an attribute proxy until the instrument is proven fit-for-use (asset calibration status applies).
5) Randomization, Stratification, and Avoiding Bias
Randomization is non-negotiable. Bias creeps in whenever operators “sample what’s easy.” Use the systems to enforce randomness:
- Spatial: Draw from different pallets, layers, and positions; for containers, reference the SSCC and use the WMS to direct which tote/pallet to pull.
- Temporal: For continuous runs, sample across time and shifts to capture time‑based variation.
- Stratification: When known subgroups exist (suppliers, lines), allocate sample counts to each stratum to get power where it matters.
- FEFO-aware: For perishable materials, integrate FEFO logic so near‑expiry stock is represented in sampling and any risk triggers early holds.
Every selection should be system-directed, barcode verified, and reproducible on paper via the audit trail—otherwise your “random” is fake.
6) GMP Controls Around Sampling
- SOPs & Versions: Approved under Document Control with effective dates, diagrams of sampling points, labeled tools, and defined containers/seals.
- Identity: Barcoded labels on samples referencing lot, container, and order; scan at each handoff to avoid mix-ups (Lot Traceability).
- Data Integrity: Secure entries with unique users, time sync, and reason-for-change per Part 11/Annex 11 and audit trails.
- Quarantine & Status: Samples trigger holds; lots stay blocked until disposition is posted to WMS/MES (Hold/Release).
- Hygiene & Cross-Contamination: Sampling tools and PPE controlled to prevent carryover (Cross-Contamination Control).
- Food Safety Context: For food and cosmetics, integrate with HACCP and Food Safety Plans.
7) Incoming Inspection—AQL-Style Plans That Work
Supplier lots are where sampling earns its keep. Practical guidance:
- Tier characteristics: Critical (C), Major (Ma), Minor (Mi). Use tighter AQLs for C, moderate for Ma, and looser for Mi, with clear defect definitions (AQL).
- Switching rules: Based on supplier performance and APR trends, escalate to tightened inspection after failures; de-escalate after sustained conformance.
- Identity testing: For actives or critical components, keep 100% Identity Testing even if other features are sampled—identity errors are existential.
- Supplier feedback loop: Failed lots open NCMR/NCR and, when systemic, a SCAR with measurable effectiveness checks.
- WMS integration: Receiving tasks create samples automatically and place lots on QA Hold; putaway is blocked from “Released” bins until disposition.
8) In-Process & Final Sampling—From SPC to Release
Inside production, sample sizes and frequencies are designed to catch drift before it breaks a spec. Use SPC charts for variable data and well-defined attribute checks (e.g., visual defects, label presence). When an IPC point fails, the MES must block progression and quarantine affected WIP. For finished goods, sample-based packaging checks (labels, GTIN scan) must be paired with electronic label verification. Release decisions are posted by QA with evidence into the eBMR and synchronized to WMS shipping rules.
9) Environmental & Microbiological Sampling
Sampling isn’t only for parts and products. In micro/EM, randomization and trendability matter more than sheer quantity. For Environmental Monitoring, define routes, frequencies, action/alert limits, and seasonality. Samples must be traceable to rooms/lines/shifts and tied to cleaning and maintenance events. Attribute calls (“TNTC”) and count ranges must be honest and controlled—no “data games.” Failures trigger quarantines and targeted cleaning or maintenance, documented as Nonconformance with MRB oversight if product risk exists.
10) When Sampling Finds Trouble—Investigations and Disposition
Sampling often surfaces the first signal of a deeper issue. Respond with rigor:
- Open Nonconformance: Log an NCR or NCMR; auto-quarantine affected scope.
- MRB: Route to the MRB for rework/scrap/release-with-justification decisions backed by evidence.
- CAPA & MOC: Systemic causes become CAPA, and any procedural changes flow through MOC.
- Traceability: Use Lot Genealogy to scope exposure and prevent escapes to customers; publish EPCIS events if required (EPCIS).
- Supplier action: When failures cluster by supplier or lane, open a SCAR and adjust inspection severity until effectiveness is proven.
11) Sample Handling, Retention, and Chain of Custody
Sampling introduces material that is not product but can compromise it if mishandled. Practical rules:
- Use tamper-evident, labeled containers; labels must carry lot, container/SSCC, location, sampler, date/time.
- Record custody transfers in LIMS/WMS with barcodes; never hand off unlabeled material.
- Define retention times and storage conditions in SOPs; expired retains must be destroyed under control—no “desk drawers.”
- For complaint or regulatory samples, lock down access and record every view/move via the audit trail.
12) Metrics That Prove Your Sampling Program Works
- Right-first-time sampling: % samples with complete identity and no corrections (data integrity proxy).
- Sampling cycle time: trigger → sample → test → disposition (by lane and reason).
- Detection performance: attribute defect rates and variable Cp/Cpk upstream vs. at release; earlier detection is cheaper.
- Switching rule stability: time spent on tightened vs. normal inspection by supplier/product.
- Escape rate: number of escapes to production/shipping caught post-facto (target: zero).
- Trend health: stability of SPC signals and reduced corrective rework over time; feed into APR and CPV.
- MSA readiness: % of variable plans backed by adequate MSA.
Don’t just count samples. Prove that sampling changes behavior—blocked picks, stopped steps, and safer releases.
13) Implementation Playbook (Forward and Frank)
- Start at receiving: Automate sample creation at GR; default lots to Hold; wire reasons and severities; make WMS direct to quarantine bins.
- Codify plans: Publish attribute and variable plans under Document Control with clear acceptance criteria and switching rules.
- Enforce randomization: Use handheld prompts to select containers by SSCC/location; require barcode scans.
- Instrument fitness: Verify calibration status at point of use; block sampling with out-of-status assets (asset calibration status).
- Identity testing first: Keep stringent identity checks for high-risk items; sampling does not replace identification.
- Integrate decisions: LIMS approvals post to WMS/MES; label services read disposition to block prints for held stock.
- Investigate and fix: Every failed lot opens Nonconformance; recurring patterns become CAPA with MOC updates.
- Teach the why: Train operators on bias, randomization, and the cost of escapes; audit with surprise pulls (Internal Audit).
- Trend relentlessly: Put sampling outcomes on SPC and APR dashboards; reward suppliers who earn reduced inspection and escalate those who do not.
Bottom line: sampling pays for itself only when it is statistical and operational—math plus interlocks, not clipboards and hope.
14) How This Fits with V5 by SG Systems Global
V5 Solution Overview. The V5 platform turns sampling plans into executable controls. Configuration is versioned, selections are handheld-directed and barcode-verified, and approval decisions flip status across modules with attributable evidence.
V5 WMS. In the V5 WMS, Goods Receipt automatically creates inspection samples, assigns randomized containers (by SSCC/bin), prints controlled labels, and defaults lots to QA Hold. Directed putaway steers to quarantine, Directed Picking excludes held stock from FIFO/FEFO, and label services refuse printing for quarantined material.
V5 MES. The V5 MES schedules IPC sampling by time/quantity, prompts operators at the right steps, and pushes variable results to SPC. Failures block progression in the eBMR until QA disposition; rework paths are controlled and signed.
V5 QMS & LIMS Integration. Within the V5 QMS, sampling SOPs and plans live under Document Control; deviations become NCR/NCMR; systemic issues become CAPA with MOC updates. LIMS approvals post Release/Reject back to WMS/MES; audit trails, signatures, and retention align to Part 11/Annex 11. Bottom line: V5 ensures sampling outcomes are more than numbers—they are plant control.
15) FAQ
Q1. When should we choose 100% inspection instead of sampling?
Use 100% inspection for identity-critical features, high-severity hazards, very small lots where sampling offers little advantage, or when measurement systems are not proven fit-for-use. Otherwise, risk-based sampling saves time and money without raising consumer risk.
Q2. Can we relax sampling for “trusted” suppliers?
Yes—if data justify it. Apply switching rules based on sustained performance and audit history. The second a failure or trend appears, escalate inspection again and consider a SCAR.
Q3. How many samples do we need for variable plans?
It depends on your risk targets and process variability. With a capable process and good MSA, variable plans typically require fewer samples than attribute plans for the same protection. Use SPC history and capability to size smartly.
Q4. Are composite samples acceptable?
Sometimes. Compositing can reduce test burden for homogeneous materials, but it can also mask local defects. Define when compositing is allowed and how many sub-samples must be retained for follow-up testing.
Q5. How do sampling results change warehouse behavior?
Dispositions from LIMS/QMS flip status in WMS/MES. Released lots become pickable and shippable; Rework routes are opened under SOP; Reject forces segregation and controlled disposal. If results don’t change movement, your integration is broken.
Related Reading
• Inspection & Release: Incoming Inspection | Hold/Release | Lot Release | Finished Goods Release
• Systems & Records: WMS | MES | LIMS | eBMR | Audit Trail (GxP) | Document Control | Data Integrity
• Methods & Control: AQL | MSA | SPC Control Limits | HPLC | Environmental Monitoring (EM)
• Identity & Traceability: Goods Receipt | Identity Testing | Label Verification | GS1 GTIN | SSCC | Lot Traceability
• Actions & Improvement: Deviation/Nonconformance | NCR | NCMR | MRB | CAPA | MOC | APR | CPV