How to Mathemetically Derive the AQL Tables given Lot Sizes

M

magomago

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 :
Code:
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 :blowup:

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!
 

Attachments

  • 0.jpg
    0.jpg
    46 KB · Views: 599
  • 1.jpg
    1.jpg
    32.2 KB · Views: 425

Statistical Steven

Statistician
Leader
Super Moderator
Re: How to Mathemetically Derive the AQL Tables given Lot Sizes ?

AQL is the Percent defective at P(A)=0.95 from your OC curve. LQ is the Percent Defective at P(A)=0.10.
 

Bev D

Heretical Statistician
Leader
Super Moderator
...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.

And you won't find it. The AQL sampling tables that have different sample sizes based on lot size were a result of negotiations, not strict probability calculations. There are correction factors out there for finite populations, but I have found that most production lot sizes are of sufficient quantity that correcting for the finite population results in only a very small change to the sample size. Not enough to bother with given the Probabilities of accepting or rejecting a lot with a given defect rate...fro very special and very small lots I would use the Hypergeometric...

...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.

As Statistical Steven said, AQL means the defect rate at which you would accept the lot XX% of the time. the XX% is typically 95% but could take on any other value you desire. It is NOT 1-P(Acceptance); that is the Probability of Rejecting the lot if it were at the AQL defect rate.
 

David-D

Involved In Discussions
Also consider that for commonly used standards MIL-STD-105 or ANSI Z 1.4) they employ a common range of sample sizes (... 8,13... 315, 500...) and common ranges of accept/reject criteria (ex 21-22). These are selected to find a best fit to the AQL point, even if slightly different, but non-standard, numbers would curve fit better.

David
 

Proud Liberal

Quite Involved in Discussions
I've always avoided using lot sizes based on the section in Grant & Leavenworth's Statistical Quality Control "Fixed Sample Size Tends Toward Constant Quality Protection" (see figures 12-1 and 12-2 in attached excerpt). This greatly simplifies incoming inspection and eliminates "games" being played with lot sizes to effect sample sizes.

Instead, I generate a AOQL plot of the sampling plan (in automotive, it is mandated that c=0) and use the maximum value to determine the worst case condition that my customer should expect (ie: n=35, c=0 yields approx 1% max value).

Am I under-thinking this?
 

Attachments

  • OC Curves (Grant & Leavenworth, Statistical Quality Control, 5th edition).pdf
    2 MB · Views: 597

Bev D

Heretical Statistician
Leader
Super Moderator
I've always avoided using lot sizes based on the section in Grant & Leavenworth's Statistical Quality Control "Fixed Sample Size Tends Toward Constant Quality Protection" (see figures 12-1 and 12-2 in attached excerpt). This greatly simplifies incoming inspection and eliminates "games" being played with lot sizes to effect sample sizes.
I understand your point but Grant and Leavenworth are not comparing a 'fixed' sample size to a 'varying' sample size like those in the popular AQL sampling tables that use lot size. the comparison they make is to the misguided use of a "% of the lot" approach to sampling.
I can see how the use of varying sample sizes based on lot size can lead to 'games' about lot sizes and I agree that having varying sample sizes is not a particularly smart things to do form a probability standpoint. (especially knowing that the approach was result of negotiations and not probability)

Instead, I generate a AOQL plot of the sampling plan (in automotive, it is mandated that c=0) and use the maximum value to determine the worst case condition that my customer should expect (ie: n=35, c=0 yields approx 1% max value).

Am I under-thinking this?

I think your approach is essentially solid. I like it.
 

Semoi

Involved In Discussions
Hi Bev D,
I know that your post is rather old. Nevertheless, I would be interested in getting a reference for your statement:
The AQL sampling tables [...] were a result of negotiations, not strict probability calculations.
I'd love to understand the tables on a deeper level, as they are periodically popping up at work. Getting the key arguments why the tables were defined as such would help me a lot.
 

Statistical Steven

Statistician
Leader
Super Moderator
Hi Bev D,
I know that your post is rather old. Nevertheless, I would be interested in getting a reference for your statement:

I'd love to understand the tables on a deeper level, as they are periodically popping up at work. Getting the key arguments why the tables were defined as such would help me a lot.

I would recommend reviewing, "Schilling RG, Neubauer DV (2009) Acceptance sampling in quality control, 2nd edn. Chapman & Hall, London."

The development of MIL-STD-105 had two special features were employed in order to gain agreement with the large body of military suppliers. One was the use of the AQL as opposed to the RQL in presenting the plans. The other feature was the practice of increasing sample sizes with increased lot sizes.
 
Top Bottom