Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I have a lot of $N$ devices, and I'd like to know if any of them are faulty. What sample size do I need in order to make sure with $100(1-\alpha)\%$ confidence that none are faulty?

share|improve this question

1 Answer

up vote 5 down vote accepted

You are asking for the number $m$ to sample so that when one or more devices are faulty, there will be at least a $100(1-\alpha)$% chance that at least one faulty device is in the sample. You have to handle the worst case of just one faulty device. Assuming the sample is random without replacement, we have (by definition) that there are $\binom{N}{m}$ such samples and $\binom{N-1}{m}$ of them do not include the faulty device. Therefore you need to find the smallest $m$ for which

$$\alpha \ge \binom{N-1}{m} / \binom{N}{m} = 1-\frac{m}{N}.$$

The solution is to take $m$ to be any whole number equal to or exceeding $(1-\alpha)N$. In brief, if you want to be (say) 95% confident there are no faulty devices, then you have to sample 95% of the lot.

You would be better off using a sequential sampling procedure if you can: sample the devices one at a time, stopping as soon as a faulty one is found or $100(1-\alpha)$% of them are sampled. For typical high confidence levels, the cost of sampling $100(1-\alpha)$% is so close to the cost of sampling $100$% that it's not worthwhile stopping there; plan to sample them all if necessary.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.