OC Curve and Sampling Plan
Six Sigma – iSixSigma › Forums › Old Forums › General › OC Curve and Sampling Plan
 This topic has 12 replies, 8 voices, and was last updated 18 years, 2 months ago by dowsen.

AuthorPosts

November 17, 2001 at 2:46 pm #28233
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.
0December 7, 2001 at 12:36 am #70425Hi 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 nonconforming 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 nonconforming part that you lead to the decision to reject the lot.
The purpose of this analysis is “what if I had 5% nonconforming, what is the probability of accepting a lot of 100 parts taking a sample of 13 parts and rejecting the lot with two nonconforming parts.” The ideal situation is that you would accept 100% of the lots up to a certain percentage of nonconformance than you would accept none of the lots.
Now for the math, the hypergeometric distribution is defined as:
P(x) = combin(d,x)*combin (Nd,nx)/combin (N,n)
where d is the actual number of nonconforming parts, n is your sample, and N is the lot size.
Using smaller numbers, the probability finding zero nonconformances by taking a sample of 3 parts out of 20 parts with 5 nonconforming 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 nonconforming 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 nonconforming parts.
I hope that this gives you the help that you needed.
TomF0December 7, 2001 at 1:16 am #70427tom,
thanks for your response.
does it means we always use hypergeometric distribution when dealing with oc? why we use that distribution then? thanks!
woey0December 7, 2001 at 2:02 pm #70429
Dave StrouseParticipant@DaveStrouse Include @DaveStrouse in your post and this person will
be notified via email.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.
0December 11, 2001 at 11:18 pm #70490Hi 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 MILSTD) is still popular. But, it is what makes them rather dangerous, as well.0December 12, 2001 at 12:03 am #70493Hi 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.0December 12, 2001 at 3:17 am #70497Howdy 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.
0February 28, 2004 at 12:29 pm #96170
Guillermo RodriguezParticipant@GuillermoRodriguez Include @GuillermoRodriguez in your post and this person will
be notified via email.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.0February 28, 2004 at 1:46 pm #96172I 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.
0February 28, 2004 at 1:50 pm #96173sorry, My email is [email protected], send message to me if you are interested.
0February 28, 2004 at 2:36 pm #96176
M SchaeffersParticipant@MSchaeffers Include @MSchaeffers in your post and this person will
be notified via email.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
0March 1, 2004 at 3:02 pm #96235
Guillermo RodriguezParticipant@GuillermoRodriguez Include @GuillermoRodriguez in your post and this person will
be notified via email.Yes Leon, please send me your Hypergeometric Excel solution if you please. I will appreciate it. Also, please send me your email address if you wishes. Yours, Guillermo
0September 6, 2004 at 1:49 am #106861Hi, Leon,
could you sent it to me too.
thanks a lot .
dowsen0 
AuthorPosts
The forum ‘General’ is closed to new topics and replies.