= Solution
Let $N$ count rotten pieces. Each item supplies an independent <Bernoulli trial> with success <probability> $p$, so $N$ has a <binomial distribution> with parameters $10,p$. There are $\binom{10}{n}$ choices of the rotten items, and each such choice has <probability> $p^n(1-p)^{10-n}$. Hence
$$
\boxed{P(N=n)=\binom{10}{n}p^n(1-p)^{10-n},\qquad n=0,\ldots,10.}
$$
For $p=0$ or $p=1$, interpret this as the corresponding distribution concentrated at zero or ten; no ambiguous $0^0$ evaluation is needed.
Back to article page