What you are looking for is an RQL plan (or some refer to it as an LTPD based plan). RQL is the defect rate that will be detected 95% of the time.

you can use the exact binomial equation (although the Poisson will work equally well at a 5% defect rate).

n = [-LN(1-P(detection)]/p

where

P(detection) is the confidence level

LN is the natural log

p is the defect rate you want to detect and reject

so n= [-LN(1-.95)]/.05 = 60 per lot

Accept on 0, reject on 1 defect in the sample.

Lot size has nothing to do with the sample size.

note that this is NOT really a 95% confidence

**interval**. Confidence intervals are used to determine the precision of a point estimate of the defect rate for the lot. Statistically these are different things.

Confidence levels are used for acceptance sampling to determine if a lot has more or less than some stated defect rate. I know it is confusing, but I am reasonably sure that your customer is asking for acceptance sampling...

if you look

here, I have provided a spreadsheet that does these calculations.