Estimation of actual defect rate in OC CurveI think that this question is a little weird.
Anyway, my questions are ;
-Lot size : 10,000
-Sample size ; 500
-AQL(Acceptable failure) : 0
-actual defect rate for sample : 0% (0/500)
Is there a way to estimate defective rates for the remaining 9,000?
How to estimate the defective rate when the inspection defect rate is 0 in a sampling inspection?

OC CurveSPCRe: Estimation of actual defect rate in OC CurveHey @IkjuShin!
That's actually a very good question! One that is asked more often than you might think.
I'm gonna break down my answer into two parts. First, I'll address what the OC curve is actually telling you. Next, I'll get at your question directly.
To start, the OC curve tells you the chances of a lot being accepted given a certain acceptance level (in this case, 0 defects in the sample) and an assumed true defects level (the assumed % of defects present in the lot). In other words, you are playing a what-if game with the curve. For example, with the output you have there, if the true % of defects was about 0.58% (that's 58 defects in a lot of 10,000), then you would accept the lot roughly 5% of the time. That seems reasonable, given that you have a pretty large sample size out of that lot. Basically, an OC curve helps you get a sense of how often you should expect to accept lots for a given defect rate. It kinda helps with determining how many defects you might have, but not explicitly.
So that brings us to your question: if I see 0 defects, what should be my estimation of how many defects there might be? Obviously, blatantly saying "there must be 0 defects" seems too risky. One way to address this is to compute a confidence interval on the true defect rate. Assuming a binomial model and a confidence level of 1-alpha, you'd get an interval that looks like [0,1-alpha^(1/N)], where N is the number of samples (I've attached a short article on this for reference). For your example, if 1-alpha=0.95 (95% confidence), then your upper bound would be 0.00597 (roughly 0.6%). This is just one of many ways to try and estimate the true rate when your point estimate is effectively 0, but it is certainly the simplest.
Now you also have a question about how many defects might be in the remaining 9,000 units not sampled. This requires a different answer. For this, we would need to operate under a Hypergeometric model (here's a Wikipedia link for more info). Technically, that's what we should have been working under all along, but with these very large sizes we're working with, the previous results wouldn't be significantly different. Rephrasing your question, for a Hypergeometric model with N=10,000 total units of which we sample n=500, we are asking what are the likely values for K (the number of defects in the lot) given that we have k=0 defects in our sample? A quick way to answer that would be to do something similar for K that we did for p when we assumed a Binomial model: compute an upper bound for a given confidence 1-alpha. Here's a snippet of JSL code that can do this for us:
prob=1;
K=0;
alpha=0.05 // change to your preference
While(prob>=1-alpha,
Print(K);
K++;
prob=Hypergeometric Probability(10000,K,500,0)
);
Basically, it looks for the highest value of K such that the probability of observing 0 defects in a sample of 500 units does not drop below 1-alpha. So for your example, if 1-alpha=0.95, then the upper bound on K is 1.
Hope that helps!
Re: Estimation of actual defect rate in OC CurveHi Calking,
This is very helpful comment. I'd like to ask further question with this.
N=10,000 n = 500, # of real defect in n = 1 (1/500),
In this situation, is the script to estimate the remaining 9500 defects correct ?
Thanks
prob=1;
K=0;
alpha=0.05; // change to your preference
While(prob>=1-alpha,
Print(K);
K++;
prob=Hypergeometric Probability(10000,K,500,1)
);
Re: Estimation of actual defect rate in OC CurveIf by your question, you mean you want to calculate an upper bound on the number of defects that might be in the remaining 9500 units given that I found only 1 in my sample of 500, then this is my long-winded way of saying "Yep!".
Re: Estimation of actual defect rate in OC CurveHi, Calking
Thank you for your kind comment. I know the meaning of your comment.
However, regardless of the value of X (whether 0, 1, or 2), the result is always 0.
I don't know what kind of error there is in the script.
Re: Estimation of actual defect rate in OC CurveHey @IkjuShin!
Apologies for the long delay. Must've missed a notification somewhere.
Looking back over my previous reply, I can confirm that the error is not in the code, but rather in the coder (as is typical). In the formula, I should have had "prob>=alpha" instead of "prob >=1-alpha". My intent was correct, but my formula was off. I've gone back and made the necessary corrections and added a note for future readers.
Sorry about that! Good catch though!
Re: Estimation of actual defect rate in OC CurveFound another bug in my code. For an upper bound, it should be looking from the top down. The reason it worked for the 0 and 1 defect case is just a fluke of the distribution. I've updated the code in the initial post and added another note.