# 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?

-

1
Your calculations are correct. – Sasha Oct 29 '11 at 6:01

1
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

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

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 12, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9278700351715088, "perplexity_flag": "middle"}