[Math] Calculating mean from the probability mass function

probability distributionsstatistics

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?

Best Answer

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$.

Related Question