# Calculating mean from the probability mass function

Question. The number of flaws $X$ on an electroplated car grill is known to the have the following probability mass function: $$\begin{matrix} x & : & 0 & 1 & 2 & 3 \\ p(x) & : & 0.8 & 0.1 & 0.05 & 0.05 \end{matrix}$$

Calculate the mean of $X$.

My working.

$$\text{Mean} = E(X) = (0 \times 0.8) + (1 \times 0.1) + (2 \times 0.05) + (3 \times 0.05) = 0.35 .$$

But the answer is $0.25$ (which is also $\frac{0.8+0.1+0.05+0.05}{4}$).

What am I doing wrong?

-
Your calculations are correct. – Sasha Oct 29 '11 at 6:01
If you sum up the probabilities and divide it by $4$, it is clear that the result will always be $0.25$. That does not have any relevance to the problem. Your answer ($0.35$) seems ok. – Srivatsan Oct 29 '11 at 6:05
Thanks, I did suspect the answers in the book are wrong. Must be a slight typo – Arvin Oct 29 '11 at 6:07

Your answer ($0.35$) looks correct, and the textbook answer is wrong.
The fraction $\frac{p(0)+p(1)+p(2)+p(3)}{4}$ will evaluate to $\frac{1}{4}=0.25$ for any probability mass function $p$, so that particular ratio does not have any significance for the expectation of $X$.