GTJunghoon:
The formula is derived from the geometric distribution which models the time between events. The distribution has a long tail to the high side (meaning that there will be long runs of events where no events are found, although these long times occur less frequently than short runs between events).
In our case the event we care about is a defect.
The form of the Geometric is: P
= p(1-p)^(n-1)
we can use this formula and derive both the lower limit for number of non-defective trials before a defect and the uppper limit.
Lower limit = (alpha/2)*(1/p)
Upper limit = -(1/p)*LN(alpha/2)
The upper limit is the maximum number of runs that will have NO defects in the sample if the true defect rate is < p. This gives you the sample size.
To check this: If you use the Exact Binomial to calculate confidence limits for zero defects in the sample size determined by the above formula the upper confidence limit will be equal to the defect rate, p.
The formulas for the Exact Binomial are quite involved (I can post them if you'd like) but a good approximation (so close thath he difference isn't of any practical importance) is to use the following functions in EXCEL
Lower Confidence Limit: BETAINV(alpha/2, d+1, n-d+0)
Upper Confidence Limit: BETAINV(1-alpha/2, d+0, n-d+1)
where d=count of defects and n= sample size.
You can google "G charts" and the "Geometric distribution" to confirm the formulas. I have no other 'source' than a straightforward derivation of the Geometric distribution and my check that I get the same answers usign the exact binomial confidence intervals.
The formula is derived from the geometric distribution which models the time between events. The distribution has a long tail to the high side (meaning that there will be long runs of events where no events are found, although these long times occur less frequently than short runs between events).
In our case the event we care about is a defect.
The form of the Geometric is: P
- Where p = the average defect rate (or in your case the maximum 'acceptable defect rate')
- P
is the probability of a defect on the nth trial. n is the sample size.
- P
is 1-alpha
we can use this formula and derive both the lower limit for number of non-defective trials before a defect and the uppper limit.
Lower limit = (alpha/2)*(1/p)
Upper limit = -(1/p)*LN(alpha/2)
The upper limit is the maximum number of runs that will have NO defects in the sample if the true defect rate is < p. This gives you the sample size.
To check this: If you use the Exact Binomial to calculate confidence limits for zero defects in the sample size determined by the above formula the upper confidence limit will be equal to the defect rate, p.
The formulas for the Exact Binomial are quite involved (I can post them if you'd like) but a good approximation (so close thath he difference isn't of any practical importance) is to use the following functions in EXCEL
Lower Confidence Limit: BETAINV(alpha/2, d+1, n-d+0)
Upper Confidence Limit: BETAINV(1-alpha/2, d+0, n-d+1)
where d=count of defects and n= sample size.
You can google "G charts" and the "Geometric distribution" to confirm the formulas. I have no other 'source' than a straightforward derivation of the Geometric distribution and my check that I get the same answers usign the exact binomial confidence intervals.