Suppose that we allow only 1 defective unit in the control sample. What is the smallest sample it should be in order to conclude that my true defective proportion of the population is smaller than 0.5% (with 95% confidence level).
I have tried to solve this problem using the
binom.confint function in R. Since my defective rate is too small (near 0), I have calculate the confidence interval of the true proportion with the Wilson interval. Then I look for the sample size who gives the nearest upper limit from the 0.5% value. The sample size that I found is 1130 since the upper limit of the IC is 0.4999%. So I can conclude that if I found 1 defective unit in a sample of 1130 units, my true defective proportion should be lower than 0.5% (with 5% error)
binom.confint(x = 1, n = 1130)
Is this a good approach? Do you have other suggestion?