# What is the OC curve?

Time：2021-2-13

Today, let’s talk about the OC curve, which is used to reflect the relationship between the probability of a batch of products being received and the unqualified rate of the batch of products. The curve is as follows: The horizontal axis is the overall defective rate (unqualified rate) of the batch, and the vertical axis is the probability that the unqualified rate is likely to be accepted by consumers.

If you look at the above sentence, you don’t know what it means. It doesn’t matter. Let’s continue to look down and understand if we don’t know.

OC curve is mainly used to explain the characteristics of sampling plan. Through the curve, we can know the quality of a sampling plan.

Suppose now you find a foundry to produce n mobile phones for you. After the foundry finished, you need to check the quality of these mobile phones. How to check? The simpler way is to try out all the N sets to see if there are any problems, but this method is obviously not reasonable. The conventional way is to randomly select n mobile phones from all N, and then use the situation of n mobile phones to reflect the overall situation of n mobile phones. And it needs to be specified in advance. When it is found that there is a problem with the quality of C set in N, it is considered that there is a problem with the whole batch and the foundry needs to go back to redo it.

In the above process, there are two kinds of risks, one is the risk of foundry, also known as producer risk; the other is your risk, also known as consumer risk.

Producer risk refers to the probability that your product’s failure rate is lower than the prescribed failure rate (we call the predetermined failure rate as acceptance standard, AQL for short), but it is still possible to be rejected, because we calculate your product’s failure rate by sampling, not for all products.

Consumer risk refers to the probability that a product may be accepted even though its failure rate is greater than the prescribed failure rate (we call this predetermined failure rate rejection standard, LTPD).

So why are these two risks? That’s because our testing is sampling, not full testing. For example, we know that if you toss a coin many times, the probability of both sides is 0.5, but if you only toss it 10 times, the probability of both sides is not necessarily 0.5. These are the two kinds of risks that are easy to exist when using sampling to judge the quality of all products.

To solve these two risks mentioned above, the solution is to increase the sample size of the sample. If we check the population n, then this problem will not occur. However, the overall n inspection costs a lot, so we need to find a balance between N and the two risks. The minimum number of samples n of the risk range can be received.

Next, let’s take a look at the receiving probability and how to calculate the specific values of the two types of risks.

Suppose that the population n = 1000, sampling n = 100, the upper limit of defective products C = 2, and the unqualified product rate P is 1.5%. Because the upper limit of products with quality problems is 2, that is, if the number of products with quality problems exceeds 2 from 100, then the batch of products will be rejected. The corresponding receiving probability is the probability of detecting 0, 1 and 2 defective products from 100 products. When calculating the receiving probability, different probability distributions have different methods, such as binomial distribution, hypergeometric distribution, Poisson distribution and so on.

By taking different values of the unqualified product rate P, we can calculate the receiving probability corresponding to different P values. Connecting these points is the OC curve we saw at the beginning.

The above is how to calculate the receiving probability. After calculating the receiving probability, we can calculate the size of two types of risk value.

Producer risk (α) = 1 – acceptance probability corresponding to AQL
Consumer risk (β) = reception probability of LTPD

Generally, the values of α and β are 0.05 and 0.1-0.2 respectively.

## A detailed explanation of the differences between Perl and strawberry Perl and ActivePerl

Perl is the abbreviation of practical extraction and report language “practical report extraction language”. Application of activestateperl and strawberry PERL on Windows platformcompiler。 Perl   The relationship between the latter two is that C language and Linux system have their own GCC. The biggest difference between activestate Perl and strawberry Perl is that strawberry Perl […]