A box contains 10 pens, and the probability that any given pen is defective is $p$.
The expected value is $\sum_{X = 0}^{10} X \binom{10}{X}p^X(1-p)^{10-X}$.
Using the binomial theorem, I know that $\sum_{X = 0}^{10} \binom{10}{X}p^X(1-p)^{10-X} = 1$.
By testing different values of $p$, I found that the expected value is $10p$.
Is there a way of proving this?
The expected value is $\sum_{X=0}^{10}\binom{10}{X}Xp^{X}(1-p)^{10-X}=10p\sum_{Y=0}^9\binom{9}{Y}p^Y(1-p)^{9-Y}=10p$. by letting $Y=X-1$