I (think) I understand how binomial works. I programmed matlab code to derive OC curves for me on the spot, and I get each piece of the equation. I've done this before several times in the past, but because I don't work with these enough, I often go back to get a refresher.
Once I successfully got my OC curves (see 0.jpg), and compared them against examples in the CQE book , I went back to the binomial equation, and thought about accepting zero defects. Reassing the equation, I found it breaks down much more simply into:
n = ln(f) / ln(1-p)
where f = probability_to_accept_such_a_lot, and p= expected lot defective %.
I then can get a beautiful graph where I have a given inspection sample size for an expected lot defective percentage, where the sample size must have no defective samples. See 1.jpg for this curve, and i pulled out couple common defective lot sizes, and the corresponding sample sizes.
Now I'd love to take it to the next step and derive AQL sampling tables for Attribute Inspection.
I searched online for the mathematics of AQL , but I'm not finding it at all! There isn't a resource that helps me see the math behind it. the most I see is subjective statements similar to "AQL is the maximum defective percentage a producer will accept in a lot. the value is typically an average over several lots".
I've assumed that 1-Pacceptance = AQL, but I'm concerned it might a shaky ground to make that assumption since technically its an average of several lots. Then I realized that I simply can't use the binomial equations because they are for infinite or very large lot sizes.
I was looking around at the hypergeometric equation, since it applies to scenarios where we don't have infinte lot sizes...are AQL tables generated from the hypergeometric equation?
I tried deriving the hypergeometric similarly c =0, but the equation is quite ugly :
Probability to Accept = (N-A)!(N-n)! / (N-A-n)! N!
I then thought that maybe I could at least understand the AQL table for very lot sizes (which should theoretically align nicely with binomial distribution) but I still don't see any alignment in the numbers.
For example, lets say I have a 500k lot, and I'm using AQL-II, that will drive a Code Letter Q. I see that for various AQLs, My accept/reject will vary. But what if I read the table backwards at this point? Rather than set an AQL level and get an accept qty, I pick my accept qty and then look at the corresponding AQL?
Lets say that I want an accept = 0, that would mean my AQL would be 0.01. So, for a lot of 500k, I'd sample about 1250 samples, and for an AQL of 0.01% I would need 0 rejects.
Now, how would it compare against the original binomial distribution? Is such a comparison valid? If I think about how much of the lot I'm sampling, it is 1250/500k = .0025% of the lot. I'd argue that binomial could be used here applying the C=0 case, and I should get a decent estimate of sample size.
However, when I take a look at 1.jpg, I find that my chart doesn't have a condition of 0.01% (I could generate it for more digits of resolution, but I won't, and you'll see why)! The best I have is a condition for 0.1% defective lot, and the sample size is 2994. That is FAR above what the AQL tables are saying...what am I missing? I feel that I'm still fundamentally not understand what AQL actually means, and how its mathmetically expressed.
My ultimate goal is to understand why AQL charts are different from AQL zero acceptance charts. I conceptually get the difference - AQL charts will provide to you the sample size, and the accept/reject qtys, whereas the latter assume accept = 0/reject =1...but that isn't good enough for me. I desperately want to understand but at this point my head will
That said, please don't be confused that I'm asking how to read the tables --I can read them very easily. I'm asking how we construct these tables, mainly because I feel there will be huge insight and learning in doing so. Any help is appreciated...thanks!