# Number of products required such that at least 1 product has the defect?

One percent of an amount of products are defect. How many products are required such that at least 1 product has the defect with probability 0.95?

What I came up with so far:

Declare $X: \text{the number of products which are defect.}$ so $X\sim Binomial(n,0.95)$

$p(X\geq1)=1-p(X=0)=1-0.05^n$

How do I proceed further?

• We have $\Pr(X\ge 1)=1-(0.99)^n$. – André Nicolas Jan 27 '16 at 17:43
• Would you mind explaining why? – user122673 Jan 27 '16 at 17:48
• One percent are defective. So the probability an item is good is $0.99$. The probability all $n$ items are good is therefore $(0.99)^n$. So the probability there is at least one bad is $1-(0.99)^n$. Now you will have to compute the suitable $n$ that gives probability at least one bad equal to roughly $0.95$. Logarithms will be involved. – André Nicolas Jan 27 '16 at 17:54

For $n$ objects where each object has a defect with probability $d$ (and thus has no defects with probability $1 - d$), the probability that at least one has a defect is equal to $1$ minus the chance of there being no defects in every component, which gives us
$P(\text{chance of at least one defect}) = 1 - (1 - d)^{n}$.
We want to set this equal to $0.95$ and we have $d = 0.01$, which gives us the equation
$0.95 = 1 - (1 - 0.99)^{n}$
which you can solve for $n$.