# Expected value question with replacement

A jar contains $17$ red balls and $5$ blue balls. Repeat the following $12$ times. Choose one ball uniformly at random (and leave it in the jar). Let $X$ be the random variable whose value is the number of blue balls that we choose. What is the expected value $E(X)$ of $X$?

1. $\frac{30}{11}$
2. $6$
3. $12\cdot \frac{5}{17}$
4. $12\cdot \frac{17}{5}$

I can't think of the answer for this one. First I thought it could be (3.) because $12$ repetition with probability but then again there are total of $22$ balls not $17$.

Our random variable has binomial distribution, $p=5/22$, and $n=12$. Recall that the binomial with parmeters $p$ and $n$ has mean $np$.
Alternately, for $i=1$ to $12$, let $X_i=1$ if the $i$-th ball drawn is blue, and let $X_i=0$ otherwise. Then $$X=X_1+X_2+\cdots+X_{12}$$ and by the linearity of expectation $$E(X)=E(X_1)+E(X_2)+\cdots+E(X_{12}).$$ Each $X_i$ has a simple distribution (Bernoulli) and its expectation is easy to compute.
Remark: The examiner "cleverly" hid the denominator $22$, which would likely have given the game away. A good deal of the work in making up multiple choice questions must go into fooling people into giving a wrong answer. (I have never put a multiple question in a test.)