Calculate defective probability, chance of at least one defective, and lot acceptance from defect rate, sample size, and allowed defectives.
- All Statistics Calculators
- Probability Of Success After N Trials Calculator
- Defect Rate Calculator
- Defect Density Calculator
Defective Probability Formula
The calculator uses a different formula for each tab.
Observed rate divides defective units by total inspected units.
p = d / N
Sample risk uses the complement rule on independent trials to find the chance of seeing at least one defective in a sample.
P(at least 1 defective) = 1 - (1 - p)^n
Acceptance uses the binomial cumulative distribution to find the chance a lot passes when the sample contains c or fewer defectives.
P(accept) = Σ (n choose k) p^k (1-p)^(n-k), for k = 0 to c
- p = probability that a single item is defective
- d = number of defective items found
- N = total items inspected
- n = sample size drawn from the lot
- c = maximum number of defectives allowed before rejection
- k = count of defectives in the sample
The formulas assume each item is independent and the per-item defect probability is constant. The binomial model is a good approximation when the sample is small relative to the lot (under about 10% of lot size). For larger sampling fractions, a hypergeometric model is more accurate.
The Observed rate tab estimates p directly from inspection data. The Sample risk tab predicts how often a sample will contain at least one defective unit given a known p. The Acceptance tab predicts how often a lot will pass an acceptance sampling plan defined by n and c.
Reference Tables
Common defect rate benchmarks expressed as percent, decimal, and defects per million (DPM or PPM).
| Quality level | Percent | Decimal | DPM |
|---|---|---|---|
| Poor | 10% | 0.10 | 100,000 |
| Below average | 5% | 0.05 | 50,000 |
| Typical | 1% | 0.01 | 10,000 |
| Good | 0.1% | 0.001 | 1,000 |
| Six Sigma | 0.00034% | 0.0000034 | 3.4 |
Chance of catching at least one defective in a sample for a few combinations of p and n.
| Defect rate p | n = 10 | n = 50 | n = 100 | n = 500 |
|---|---|---|---|---|
| 0.1% | 1.0% | 4.9% | 9.5% | 39.4% |
| 1% | 9.6% | 39.5% | 63.4% | 99.3% |
| 5% | 40.1% | 92.3% | 99.4% | ~100% |
| 10% | 65.1% | 99.5% | ~100% | ~100% |
Worked Examples
Example 1: Observed rate. You inspect 500 units and find 12 defectives. The defect probability is 12 / 500 = 0.024, or 2.4%. The non-defective rate is 97.6%, and the process runs at 24,000 DPM.
Example 2: Sample risk. A line runs at p = 2.4%. You pull a random sample of 30 units. The probability of zero defectives is (1 – 0.024)^30 = 0.481. The chance of finding at least one defective is 1 – 0.481 = 0.519, or about 51.9%.
Example 3: Acceptance sampling. A lot at p = 5% is sampled with n = 30 and c = 2. P(accept) is the binomial sum from k = 0 to k = 2, which equals about 81.2%. So roughly 1 in 5 lots at this defect rate would be rejected by this plan.
FAQ
What if my sample is a large fraction of the lot? The binomial formula assumes sampling with replacement or an effectively infinite lot. If your sample exceeds about 10% of the lot, switch to the hypergeometric distribution for tighter accuracy.
How many units should I inspect to estimate p? For rough estimation, the relative error in p shrinks with sqrt(N). To resolve a defect rate near 1% within ±0.5%, you need a sample on the order of 1,500 to 2,000 units.
Why does my observed rate differ from the supplier’s stated p? Small samples have wide confidence intervals. Use the sample risk tab to see how much variation is normal at the stated p before concluding the supplier is off target.
Can p be zero? The calculator accepts zero, but a finite sample with zero defectives does not prove p = 0. Use the rule of three: the upper 95% bound on p is roughly 3/N when no defectives are found.
