There a few different ways to sample a lot (or group) of material to determine if it has an acceptably low failure rate (or proportion that are considered ‘bad’). The following is an example of the sequential sampling method, which happens to be rather efficient by generally using the fewest samples for the same risk protection.
Given
Various lots with unknown portion with failure condition, and it appears some lots have a higher fraction with unacceptable condition than others.
Desire a sampling plan to determine efficiently if the lot has an acceptable lower occurrence of failure proportion or not.
Nominal expected portion failing is 1%, and a 5% proportion failing is considered too high.
Use a sequential sampling plan to determine if the lot is acceptable or not at 5% threshold with suitable confidence and power.
Assuming a random sample of units from within lot and the testing produces a clear indication or not according to internal testing procedures.
The sequential sampling method, also known as Sequential Probability Ratio Tests (SPRT) or Probability Ratio Sequential Tests (PRST), evaluates one sample at a time and determines if the lot is accepted, rejected or if another sample must be evaluated.
Necessary Information
Producer quality level, p1
p1 = 0.01 or 1%
Consumer’s quality level, p2
p2 = 0.05 or 5%
Producer’s risk, ?
? = 0.05 or 1-? = 0.95 or 95% confidence
Consumer’s risk, ?
? = 0.10 or 1-? = 0.90 or 90% power
Decision criteria calculation
Parameters
h1 = log [(1 – ?) / ? ] / {log (p2/p1) + log [( 1 – p1) / (1 – p2 )]}
h2 = log [(1 – ?) / ? ] / {log (p2/p1) + log [( 1 – p1) / (1 – p2 )]}
s = log [( 1 – p1) / (1 – p2 )] / { log (p2/p1) + log [( 1 – p1) / (1 – p2 )]}
Acceptance line
y1 = sk – h1
Rejection line
y2 = sk + h2
k = number of samples taken, start at 1 and progress till decision is accomplished by crossing one or the other line.
The horizontal axis is the number of samples evaluated, and the vertical axis is the number of cumulative failures.
dk = cumulative number of nonconforming by the kth sample
Decision criteria
Accept if
dk ≤ y1 = sk – h1
Reject if
dk ≥ y2 = sk + h2
Continue sampling if
y1 < dk < y2
Please see spreadsheet for calculations.
If we select ? = 0.10 and ?=0.20, then if we sample 37 units and there are zero failures, then we can accept the lot. If we sample, up to 29 and have two failures we can reject the lot. Both are with 90% confidence and 80% power discriminating between an expected 1% expected rate and the unwanted higher than 5% rate.
Attached is a spreadsheet called, sequential sampling by attributes, (Excel) that may be useful as you work with this concept.
Related:
OC Curve with Binomial Method (article)
How to read an OC curve (article)
OC Curve with Hypergeometric Method (article)
uhemant says
Thanks a lot Fred for your blog! I have a question on PRST:
If we reach the truncation lines in the plans, what decision should be made? What are the criteria? Will appreciate your views.
Hemant Urdhwareshe
Fred Schenkelberg says
Hi Hermant,
My first thought was we do not have clear evidence that the lot is good or bad, thus you would rely on local policy to accept or reject the lot.
Then I thought there must be a reference for this and checked Juran, Grant and Leavenworth, and my trust college stats book and they all do not discuss this situation. In fact I’ve not see any discussion what to do when hitting a truncation line.
If you cross the accept or reject lines, you accept or reject the lot, which is clear, but what if you run out of samples before having too many good or bad units?
I’m going to have to dig into the formulas for the truncation lines and see how they stack up with OC curves and may find a solution. In the meantime, I recommend that you either continue sampling or conclude the lot has a defect rate somewhere between what your would consider acceptable or unacceptable – thus most would conclude the lot is suspect or on the border of being rejected.
Good question!
Cheers,
Fred
Johann says
Hi. How can I download the Excel file mentioned in the post? There’s no link.
Fred Schenkelberg says
Hi Johann, thanks for letting me know. The link was broken and should be working now. cheers, Fred
Larry George says
Thanks for the article. A friend in New Zealand sent me his spreadsheet version, without documentation, and I couldn’t figure out the formulas. It finally dawned on me that it was an SPRT. I still can’t figure out the motivation for % nonconforming. Seems arbitrary.