| Lot ID | Population IDs | Sample size | Sample output (example) | Use case |
|---|---|---|---|---|
| LOT-2401 | 1-100 | 10 | 7, 81, 13, 56, 92... | Incoming inspection |
| LOT-2402 | Batch-A items | 8 | A-1002, A-1011... | In-process checks |
| LOT-2403 | 1-500 | 20 | 14, 155, 302... | Final audit sampling |
This tool performs simple random sampling without replacement. Each ID has equal selection probability, and no ID can appear twice.
- Population size (N): number of unique IDs available.
- Sample size (n): number of unique IDs selected, with 1 ≤ n ≤ N.
- Core method: partial Fisher-Yates shuffle using a uniform random index: j = i + U(0, N-i-1), then swap elements i and j.
- Output: first n elements after the partial shuffle.
- Select Range to sample numeric IDs, or List to sample pasted IDs.
- Enter Sample size (n) based on your inspection plan.
- Optional: add a Seed to reproduce the same sample later.
- Press Generate sample to show results above the form.
- Use Download CSV or Download PDF for records.
Random selection helps reduce bias in inspections. Keep the seed and settings with the lot record to support traceability during audits.
Random sampling supports defensible quality decisions by giving every unit in a lot the same chance of selection. When inspection resources are limited, a properly selected sample can reveal process shifts early and reduce the risk of missing localized defects. Consistency matters: record the population definition, the chosen sample size, and the generation time so your sampling plan is repeatable and reviewable.
Sample size is a business decision that balances inspection cost against the consequences of nonconforming product escaping. Higher criticality, unknown supplier capability, or recent process changes justify larger samples. For stable processes, smaller samples may be appropriate when combined with trending and corrective actions. Always keep n ≤ N, and avoid convenience patterns such as “first items off the line.”
This calculator uses simple random sampling without replacement. Internally, it performs a partial Fisher-Yates shuffle: for each position i, it swaps with a uniformly selected index j from the remaining pool. Taking the first n values after these swaps produces a sample where each ID is equally likely and no ID can appear twice. Sorting the output only changes display order, not which units were selected.
A seed provides controlled repeatability. If you enter the same seed with the same population definition and sample size, the generator will reproduce the same sample sequence, which is valuable for audits, investigations, and cross-team reviews. If you leave the seed blank, the tool uses an automatic seed for day-to-day randomness. Store the seed and parameters with the lot record to preserve the decision trail.
Exported sample lists reduce manual transcription errors and speed up execution on the shop floor. Use the CSV output for spreadsheet checklists and barcoded traveler documents, and use the PDF output for controlled records and supplier communications. For non-numeric identifiers, the list mode supports mixed formats and removes duplicates before sampling. Combine random selection with clear acceptance criteria, defect classification, and documented disposition steps.
Each selected ID is removed from the pool, so it cannot be chosen again. This prevents duplicates and keeps the sample truly unique.
Use a seed when you need repeatable results for audits, investigations, or approvals. The same seed with identical inputs recreates the same sample.
Yes. Switch to list mode and paste IDs separated by lines or commas. The tool removes duplicates and then samples from the unique set.
Sorting makes the list easier to locate in bins or racks, but it does not change which IDs were selected. It only changes display order.
The calculator blocks the request. Reduce the sample size or expand the population definition, because you cannot pick more unique items than exist.
Save the population definition, sample size, seed used, date/time, and exported list. Pair it with acceptance criteria and inspection outcomes for traceability.