ThisCalculator

Everyday

OC Curve Calculator: How It Works & Use

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

An OC (Operating Characteristic) curve calculator plots the probability of accepting a lot against the actual defect rate for a given sampling plan. You enter the lot size, sample size, and acceptance number, and the calculator returns the probability of acceptance for various defect rates, often displayed as a table or graph. This helps you evaluate how well a sampling plan distinguishes between good and bad lots.

Formula

The OC curve is based on the binomial distribution, which gives the probability of observing exactly k defects in a sample of n items when the true defect rate is p. The probability of acceptance (Pa) is the sum of probabilities for all k from 0 to the acceptance number c:

Pa = Σ (from k=0 to c) [ C(n, k) * p^k * (1-p)^(n-k) ]

Where:

  • n = sample size (number of items inspected)
  • c = acceptance number (maximum number of defects allowed in the sample)
  • p = true defect rate in the lot (as a fraction, e.g., 0.02 for 2%)
  • C(n, k) = binomial coefficient (number of ways to choose k defects from n items)

For large n and small p, the Poisson approximation is often used: Pa ≈ e^(-np) * Σ (np)^k / k!. The calculator above uses the exact binomial formula.

Worked Example

Using the default values: sample size n = 50, acceptance number c = 1, defect rate p = 2% (0.02).

Step 1: Calculate the probability of 0 defects: C(50,0) * (0.02)^0 * (0.98)^50 = 1 * 1 * 0.364 = 0.364

Step 2: Calculate the probability of exactly 1 defect: C(50,1) * (0.02)^1 * (0.98)^49 = 50 * 0.02 * 0.371 = 0.371

Step 3: Sum these probabilities: Pa = 0.364 + 0.371 = 0.735, or 73.5%.

So with a sample of 50 and accepting up to 1 defect, you would accept about 73.5% of lots that truly have a 2% defect rate.

When to Use an OC Curve Calculator

OC curves are essential in quality control, particularly in acceptance sampling plans (e.g., ANSI/ASQ Z1.4, ISO 2859). Use them to:

  • Compare different sampling plans (n, c) to see which gives better protection against accepting bad lots.
  • Determine the probability of accepting a lot at a given quality level (e.g., AQL or LTPD).
  • Assess the risk of rejecting good lots (producer’s risk) or accepting bad lots (consumer’s risk).
  • Optimize sample size and acceptance number to balance inspection cost and quality assurance.

How to Read the OC Curve

The OC curve plots the probability of acceptance (Pa) on the y-axis against the lot defect rate (p) on the x-axis. A perfect sampling plan would have Pa = 1 for all defect rates below the AQL and Pa = 0 for all rates above the LTPD, but real plans produce an S-shaped curve. The steeper the curve, the more discriminating the plan. The point where the curve crosses the AQL (acceptable quality level) indicates the producer’s risk (usually 5% or 10%). The point where it crosses the LTPD (lot tolerance percent defective) indicates the consumer’s risk (typically 10%).

Common Mistakes and Misconceptions

  • Using the wrong distribution: The binomial distribution assumes sampling with replacement or an infinite lot. For finite lots, the hypergeometric distribution is more accurate, but the binomial is a good approximation when the sample size is less than 10% of the lot.
  • Confusing AQL and LTPD: AQL is the worst defect rate that is still considered acceptable (high Pa), while LTPD is the defect rate that is considered unacceptable (low Pa). They are not interchangeable.
  • Misinterpreting Pa: Pa is the probability of accepting the lot, not the probability that the lot is good. A lot with a 2% defect rate has a 73.5% chance of being accepted, but that doesn’t mean it’s 73.5% good.
  • Ignoring the sample size relative to lot size: If the sample is a large fraction of the lot (e.g., >10%), the binomial approximation may be off. Use the hypergeometric distribution for small lots.

Limitations of the OC Curve

OC curves assume random sampling and that the defect rate is constant throughout the lot. They do not account for inspection errors (e.g., a defective item being missed) or variations in quality within the lot. Additionally, the binomial distribution assumes each item is independent, which may not hold if defects are clustered. For very low defect rates, the Poisson approximation is often used, but it can deviate for small sample sizes.

Frequently Asked Questions

Q: What is the difference between an OC curve and a power curve?
A: An OC curve shows the probability of accepting a lot (or hypothesis) given a true defect rate. A power curve is the complement—it shows the probability of rejecting a lot (1 – Pa). They are two sides of the same coin.

Q: How do I choose the sample size and acceptance number?
A: Start with your AQL and LTPD. Then select a plan that gives a Pa of at least 0.95 at the AQL and no more than 0.10 at the LTPD. Many standards provide tables of plans; you can use this calculator to verify the OC curve for a chosen plan.

Q: What is the producer’s risk and consumer’s risk?
A: Producer’s risk (α) is the probability of rejecting a good lot (at AQL). Consumer’s risk (β) is the probability of accepting a bad lot (at LTPD). Typically α = 0.05 and β = 0.10.

Q: Can I use this calculator for any lot size?
A: The calculator uses the binomial distribution, which is accurate when the sample size is less than about 10% of the lot. For larger samples, use the hypergeometric distribution for a more precise result.

Q: What is the Poisson approximation and when is it used?
A: The Poisson approximation is a simpler formula that works well when n is large (say >20) and p is small (<0.1). It replaces the binomial coefficient with e^(-np) * (np)^k / k!. It's often used in quality control for convenience, but the exact binomial is preferred for small n or large p.

Q: How does the acceptance number affect the OC curve?
A: A larger acceptance number (c) makes the curve flatter, meaning you are more likely to accept lots with higher defect rates. A smaller c makes the curve steeper, giving better discrimination but increasing the chance of rejecting good lots.

Related

Formula used
in n | Sample size | units | 50 | 0
in c | Acceptance number | defects | 1 | 0
in p | Defect rate | % | 2 | 0
out Pa | Probability of acceptance | % | 100 * exp(-n * (p/100)) * sum_{k=0}^{c} ( (n * (p/100))^k / fact(k) ) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.