if 1 in 50 baked bean tins is incorrectly labelled in a factory, if 1 in 50 baked bean tins is incorrectly labelled in a factory, how large a sample of tins must be inspected for the probability to be at least 0.5 of finding one or more incorrectly labeled tins?
I'm really stuck on this one??
anybody know how to do it??
 A: To show you why this is a binomial distribution, start with small samples of tins.
Each individual tin has a $\frac{1}{50}$ chance of being incorrectly labeled, so for a sample size of $1$ tin, the chance of finding a bad tin is $\frac{1}{50}$. Alternatively, the chance of not finding any bad tins is $\frac{49}{50}$. (I'll show you later why I added this statement.)
Now let's take the case of $2$ tins. The probability of finding $0$ bad tins is $\left( \frac{49}{50} \right)\left( \frac{49}{50} \right)$. The probability of finding $2$ bad tins is $\left( \frac{1}{50} \right)\left( \frac{1}{50} \right)$. The probability of finding $1$ bad tin, however, requires one more step, because there are two ways of doing this. First the bad tin then the good tin, or first the good tin and then the bad tin. This makes the probability $2\left( \frac{1}{50} \right)\left( \frac{49}{50} \right)$. Now you could add up the cases of $1$ and $2$ bad tins, but it's much easier to find the probability of finding $0$ bad tins, and subtracting from $1$.
So let's add more tins. We can keep going on like this, but we need to answer two more questions to generalize a solution. How can we find the number of ways to pick exactly $k$ bad tins out of $n$? You should probably know that this is just the binomial coefficient $\binom{n}{k}$. Finally, how do we find the general probability of finding exactly $k$ bad tins out of $n$? Let's call the probability of drawing one bad tin $p$. With $k$ bad tins, each particular choice has a chance $p^k$ for the bad tins, and $(1-p)^{(n-k)}$ for the good ones. Multiplying this with the number of choices, we have the formula $\binom{n}{k}p^k(1-p)^{(n-k)}$. Finally, we just sum them up for whatever cases we need.
It's easy to show that the total probability is $1$. The binomial theorem states that the expansion:
$$
(x+y)^n = \sum\limits_{k = 0}^n \binom{n}{k}x^ky^{n-k}
$$
Setting $x = p$ and $y = 1-p$ we get:
$$
(p+1-p)^n = \sum\limits_{k = 0}^n \binom{n}{k} p^k(1-p)^{n-k} = 1
$$
For our particular case, it's much easier to solve for not finding bad tins:
$$
1-\sum\limits_{k = 1}^n \binom{n}{k} p^k(1-p)^{n-k} = 1 - p^0(1-p)^{n-0} = 1 - (1-p)^n \\
1-(1-p)^n = 1 - \left(\frac{49}{50}\right)^n \ge \frac{1}{2} \\
\frac{1}{2} \ge \left(\frac{49}{50}\right)^n \\
\ln{\frac{1}{2}} \ge n \ln \frac{49}{50} \\
\frac{\ln{1} - \ln{2}}{\ln{49} - \ln{50}} \le n \\
n \ge \frac{\ln{2}}{\ln{50} - \ln{49}}
$$
You'll find the the smallest integer $n$ is $35$.
A: Probability that one or more tins are incorrectly labelled = 100% - Probability that all tins are correctly labelled
Following this, the probability that all tins are labelled correctly is :
$P_{all}=(\frac{49}{50})^N$ where N is the number of tins (independent tins I assume).
It means you just have to solve for N :
$$1-P_{all} \ge 50\%$$
In other words :
$$0.5 \ge (\frac{49}{50})^N$$
And you find :
$$ N \ge \lceil\frac{ln(0.5)}{ln(49/50)}\rceil = 35$$
