iSixSigma

OC Curve and Sampling Plan

Six Sigma – iSixSigma Forums Old Forums General OC Curve and Sampling Plan

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #28233

    woey
    Member

    I have a sampling make up. ANSI/ASQC Z1.9, 0.65% AQL, Normal Inspection. How can I construct OC curve based on this? Anyone can help? Thank you.

    0
    #70425

    TomF
    Member

    Hi Woey,
    I just stumbled across your posting.  I hope that its not too late to give you help.  The equation for an operating characteristic curve is based on a distribution called the HyperGeometric Distribution. 
    In constructing a chart, the horizontal axis is based upon the actual percent of non-conforming product in the lot.  The vertical axis is the probability of accepting the lot.  To plot each OC curve, you will need to define the lot size, sample size and a reject number–a number of non-conforming part that you lead to the decision to reject the lot.
    The purpose of this analysis is “what if I had 5% non-conforming, what is the probability of accepting a lot of 100 parts taking a sample of 13 parts and rejecting the lot with two non-conforming parts.”  The ideal situation is that you would accept 100% of the lots up to a certain percentage of non-conformance than you would accept none of the lots.
    Now for the math,  the hypergeometric distribution is defined as:
    P(x) = combin(d,x)*combin (N-d,n-x)/combin (N,n)
    where d is the actual number of non-conforming parts, n is your sample, and N is the lot size. 
    Using smaller numbers, the probability finding zero non-conformances by taking a sample of 3 parts out of 20 parts with 5 non-conforming parts is:
    P(0) = combin (5, 0)*combin(95, 5)/combin (100, 10) = 1* 455/1140 = 40%
    Note that if your reject number is two non-conforming parts then you have to calculate P(1) also.  In the above example P(1) =  46%
    So you would accept this lot 86% of the time if you rejected the lot when you found two non-conforming parts.
    I hope that this gives you the help that you needed. 
    TomF 

    0
    #70427

    woey
    Member

    tom,
    thanks for your response.
    does it means we always use hypergeometric distribution when dealing with oc? why we use that distribution then? thanks!
     
    woey

    0
    #70429

    Dave Strouse
    Participant

    Woey-
    TomF is correct in stating that acceptance sampling is based on the hypergeometric. This is the distribution to use when sampling without replacement, i.e. taking an item for inspection from the population and NOT putting it back into the population before taking the next item. But the math is difficult because of the large factorials. If you try to put a lot size greater than about 3000 for instance into Excel, it cannot calculate the probabilities. There are sites available on the net where you can find individual large number probabilities and MINITAB will do this also.
    However,  in many cases, wheter replacing an item or not, the probability of selecting the same item for inspection again is not affected to any degree. That is, if the lot size is 10 and 2 are selected, the probability of reselecting the same part if it is replaced is high ( 1 in 10). But if the lot size is 1000 and two are selected the probability of reselection is small ( 1 in 1000) . In that case a much more mathematically tractable distribution that assumes sampling with replacement is used, the binomial. This distribution is extensively tabulated and simple spreadsheet programs can do the math.
    The usual rule of thumb is to use the binomial approximation to the hypergeometric when the sample is less than 10% of the lot. In turn this binomial may be approximated by the Poisson when np is less than 5 and by the normal when np > 5.
    The ANSI spec you cite is based on the binomial approximation and the Poisson when the approximation conditions apply as it is actually the probability of a sequence of many lots being accepted from a process with a proportion defective of (AQL)%. There is another ANSI spec on isolated lots which uses the hypergeometric.
    You can easily generate the curves in Excel. In a column e.g. A place the percent defectives as decimal, i.e from say 0.0005 (.05 % defective) to .2 is usually a good range in steps of 0.0005 or whatever resolution you desire. Then in another column e.g. B use the BINOMDIST function  and put in parameters of acceptance number Ac for number of successes, sample size n for trials, the column A cell reference for probability of success and True in the cumulative function.
    You can then graph the probability of acceptance Pa in the B  column vs the per cent defective in the A column. This should match the ANSI curves.
    Hope this helps. If you want a very detailed explination of these concepts, the standard reference work is ACCEPTANCE SAMPLING IN QUALITY CONTROL, Edward G. Schilling from ASQC press. . This is probably a lot more than you will really want to know however.
     

    0
    #70490

    Thom
    Member

    Hi Dave Strouse,
    Wow!  A voice from the not so distant past…
    I have a nice illustration for the 10% rule of thumb (sample size is less than 10% of the lot size) that I use when I teach this stuff…
    Calculate the probability of winning the Texas Lottery using the hypergeometric and then calculate using the binomial.  The Texas Lotto has 54 possible numbers, and you win by matching 6 out of 6.
    If you use Excel, type in =hypgeomdist(x,n,D,N) where x=n=D=6, and N=54 to get the exact.  To approximate using the binomial, type in =binomdist(x,n,p, false), where x=n=6, and p=n/N=6/54. 
    As a neat trick, type in =combin(N,n) where N=54 and n=6.  How does this compare with the results from the hypergeometric? 
    Note that the hypergeometric function in Excel only returns the mass function — Pr (X=x).  This makes it a little more difficult to construct OC curves on Excel using the hypergeometric, but not impossible.  Reply to this posting with contact information if you are interested in how to set up OC curves in Excel using the hypergeometric.
    However, Excel lets you calculate both the mass and cumulative density functions for both the binomial and the Poisson distributions (that last little statement on the end of the function).  If you type in true, it will give you the cumulative — Pr (X<=x).  If you type in false, it will give you the mass — Pr (X=x).
    Wow… all this probability stuff.  This is one of the reasons that the ANSI spec (old MIL-STD) is still popular.  But, it is what makes them rather dangerous, as well.

    0
    #70493

    TomF
    Member

    Hi Thom,
    I wanted to explicitly state the results of your Texas Lotto example and clarify your point to prevent anybody from misunderstanding your posting.
    Using the binomial distribution, the probability is approximately 0.000188% while using the hypergeometric distribution is approximately 0.000004%
    Don’t be misled that the binomial distribution gives you an answer 48 times larger than the hypergeometric distribution.  We are concerned with the magnatude of these numbers.  In this case, forty eight times a negligible number is still negligible.
    A example closer to real life applications would be to calculate the probability of having only one number selected (as though you had one as the reject number).  You can modify Thom’s equations by replacing the first six with a one.   The binomial distribution gives you approximately 37% chance of drawing one number while the hypergeometric gives you about 40% chance.  This 3% (actual 2.78%) difference is usually considered an acceptable rounding difference.
    Thanks,
    Tom F.

    0
    #70497

    Thom
    Member

    Howdy TomF,
    Great reply!  Nice illustration of practical versus statistical significance. 
    For the Lotto example, the practical significance is readily apparent: if you use the exact distribution (hypergeometric), you will find that there is a 1 in 25,827,165 chance of winning the lottery.
    If you used the approximation (binomial), you will find a 1 in 531,441 chance of winning the lottery. 
    Nice illustration of potentially misleading results for an approximation that pushes the rule of thumb… 
    If interested, I can shoot you a nice summary about how you turn that combinatric mess associated with the hypergeometric into a binomial.
     

    0
    #96170

    Guillermo Rodriguez
    Participant

    Would you be so kind to tell me how can I develop OC curves by using the Hypergeometric function in Excel?
    I would appreciate this. Thank you very much in advance!
    Yours, G. Rodriguez.

    0
    #96172

    Leon
    Participant

    I have programed a excel program for acceptance sampling(with OC curve drawing). but it is too big. and i have no time to optimize the program by  VB or VC . if you do not mind . i can send it to you for reference.

    0
    #96173

    Leon
    Participant

    sorry, My email is [email protected], send message to me if you are interested.

    0
    #96176

    M Schaeffers
    Participant

    Hello outthere, I just read this discussion for the first time.
    For people who work with sampling plans and OC curves there is a program which draws the OC curve for single and double sampling plans. You can even match sampling plans based on a requirement.
    It is a very neat program
    It is called Sampling Plan Analyzer from Taylor Enterprises.
    You can download a version which will work for 30 days from ww.spcwizard.com
     

    0
    #96235

    Guillermo Rodriguez
    Participant

    Yes Leon, please send me your Hypergeometric Excel solution if you please. I will appreciate it. Also, please send me your e-mail address if you wishes. Yours, Guillermo

    0
    #106861

    dowsen
    Participant

    Hi, Leon,
     could you sent it to me too.
    thanks a lot .
    dowsen

    0
Viewing 13 posts - 1 through 13 (of 13 total)

The forum ‘General’ is closed to new topics and replies.