The Elsmar Cove Business Systems and Standards Discussion Forums How to Mathemetically Derive the AQL Tables given Lot Sizes
 Forum User Name Keep Me Logged In Password
 Register Photo Albums Blogs FAQ Social Groups Calendar Search Today's Posts Mark Forums Read

 Elsmar Cove Forum Visitor Notice(s) It is the start of the Memorial Day holiday weekend in the US so activity in the forum will be slow through the weekend. Since Memorial Day is observed on Monday I expect activity here to be slow through the weekend and on Memorial Day.

# How to Mathemetically Derive the AQL Tables given Lot Sizes

 Elsmar XML RSS Feed Monitor the Elsmar Forum Sponsor Links Courtesy Quick Links Links that Cove visitors will find useful in your quest for knowledge: International Standards Bodies - World Wide Standards Bodies International Standards Organization - ISO Standards and Information Quality Digest

Post Number #1
25th May 2015, 07:24 PM
 magomago Total Posts: 2
How to Mathemetically Derive the AQL Tables given Lot Sizes

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

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!
Attached Thumbnails

Post Number #2
26th May 2015, 07:08 AM
 Statistical Steven Total Posts: 1,077
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.
 Thank You to Statistical Steven for your informative Post and/or Attachment!
Post Number #3
26th May 2015, 12:25 PM
 Bev D Total Posts: 3,472
Re: How to Mathemetically Derive the AQL Tables given Lot Sizes

Quote:
 In Reply to Parent Post by magomago ...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...

Quote:
 In Reply to Parent Post by magomago ...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.
 Thank You to Bev D for your informative Post and/or Attachment!
Post Number #4
27th May 2015, 06:24 AM
 David-D Total Posts: 94
Re: How to Mathemetically Derive the AQL Tables given Lot Sizes

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
 Thanks to David-D for your informative Post and/or Attachment!
Post Number #5
27th May 2015, 01:00 PM
 Proud Liberal Total Posts: 135
Re: How to Mathemetically Derive the AQL Tables given Lot Sizes

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?
Attached Files: 1. Scan for viruses before using, 2. Please report any 'bad' files by Reporting this post, 3. Use at your Own Risk.
 OC Curves (Grant & Leavenworth, Statistical Quality Control, 5th edition).pdf (2.03 MB, 59 views)
Post Number #6
28th May 2015, 12:53 PM
 Bev D Total Posts: 3,472
Re: How to Mathemetically Derive the AQL Tables given Lot Sizes

Quote:
 In Reply to Parent Post by Proud Liberal 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)

Quote:
 In Reply to Parent Post by Proud Liberal 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.

 The Elsmar Cove Business Systems and Standards Discussion Forums How to Mathemetically Derive the AQL Tables given Lot Sizes

 Bookmarks

 Visitors Currently Viewing this Thread: 1 (0 Registered Visitors (Members) and 1 Unregistered Guest Visitors)

 Forum Posting Settings You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Emoticons are On [IMG] code is On HTML code is Off Forum Rules

 Similar Discussion Threads Discussion Thread Title Thread Starter Forum Replies Last Post or Poll Vote pammesue Statistical Analysis Tools, Techniques and SPC 6 27th March 2014 07:37 PM baioce Inspection, Prints (Drawings), Testing, Sampling and Related Topics 4 12th February 2013 11:13 AM Atish AQL - Acceptable Quality Level 4 29th October 2010 02:56 PM D.Salman Statistical Analysis Tools, Techniques and SPC 1 2nd June 2010 06:35 AM Govindarajalu - 2005 Professional Certifications and Degrees 4 6th January 2007 02:19 PM

The time now is 08:14 AM. All times are GMT -4.