How to use the acceptance sampling oc curve calculator
- Enter the sample size (n) and the accept number (c) of the plan. The lot is accepted if the sample holds c defective items or fewer.
- Leave the lot size blank for a very large lot, or enter it to use the exact hypergeometric chance for a lot of that size.
- List the percent-defective levels you want to see, and enter a good quality level and a poor quality level for the two risks.
- Read the table of the chance of accepting at each level, the producer's and consumer's risks and the outgoing quality.
Formula
very large lot: Pa(p) = sum for k = 0 to c of C(n, k) p^k (1 - p)^(n - k)
lot of N with D defective: Pa = sum for k = 0 to c of C(D, k) C(N - D, n - k) / C(N, n)
producer's risk = 1 - Pa(good level); consumer's risk = Pa(poor level)
outgoing quality = Pa x p x (N - n) / N (or Pa x p for a very large lot)
The outgoing quality assumes rejected lots are inspected completely and every defective found is replaced with a good item, so it is the average quality of what ships.
Inspect 50, accept on 1 or fewer
For a plan that draws 50 items and accepts on at most 1 defective, a lot that is 2 percent defective is accepted with probability 0.98^50 + 50 x 0.02 x 0.98^49 = 0.3642 + 0.3716 = 73.58 percent. At 1 percent defective the chance is 91.06 percent, so the producer's risk at a good quality level of 1 percent is 8.94 percent.
At 8 percent defective the plan accepts only 8.27 percent of lots, which is the consumer's risk at a poor quality level of 8 percent. Among the levels listed, the outgoing quality is highest at 3 percent defective, where it is 1.67 percent. For a lot of 500 with 1 percent defective (5 items), the exact chance of accepting rises to 91.94 percent.
How to read an OC curve
An operating characteristic curve plots the chance of accepting a lot against the true fraction defective. A good plan accepts nearly every good lot and rejects nearly every bad one, so its curve falls steeply between the two. A plan with a small sample and a loose accept number has a flat curve that fails to tell good from bad.
Increasing the sample size makes the curve steeper, and raising the accept number moves it to the right. The two risks are read from the curve at the quality levels you care about: the producer's risk is the chance of rejecting a good lot, and the consumer's risk is the chance of accepting a bad one.
Binomial or hypergeometric
When the lot is much larger than the sample, each item drawn is nearly independent of the last, and the binomial formula is a good approximation. For a small lot, drawing without replacement matters, and the exact hypergeometric formula is better. Entering a lot size switches the page to that formula and rounds the number of defective items in the lot to a whole item.
For single probabilities, use the Binomial Probability Calculator or the Hypergeometric Distribution Calculator. To express defects as a rate per million, see the DPMO and Sigma Level Calculator.
Assumptions and limits
- The plan is a single sampling plan: one sample, one accept number. Double and sequential plans are not modeled.
- Items are inspected without error, and a defective is either defective or not.
- For a lot size entered, the number of defective items is the percent times the lot size, rounded to a whole item.
- The plan does not replace a standard your customer requires, and it does not choose a plan for you.
- Nothing typed here leaves your browser.
Frequently asked questions
What do producer's risk and consumer's risk mean?
The producer's risk is the chance that a lot at the good quality level is rejected anyway. The consumer's risk is the chance that a lot at the poor quality level is accepted anyway. Both come from the same curve.
Why is the outgoing quality lower at high defect rates?
Because most lots with many defects are rejected and fully inspected, so few of those defects ship. Outgoing quality peaks at a middle defect rate and falls at both ends.
What accept number should I choose?
Try several and compare the two risks. A larger sample or a smaller accept number lowers the consumer's risk, while a larger accept number lowers the producer's risk, and the table shows the tradeoff.
Why does a lot size give a different answer?
With a small lot, each item drawn changes the chances for the next, which the binomial formula ignores. The exact formula accounts for it, so it gives a somewhat higher chance of accepting a lot with few defects.