# Expected values with choosing involved

Hi I was working on this question for my exam review:

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

The textbook answers page says $\frac{30}{11}$ but I have no idea how it ended up with that answer even though understand the basic concept of expected value any help?

• Expected number of blue balls = probability of choosing a blue ball * number of picks. – Braindead Apr 25 '14 at 22:25
• This was asked and answered today. – André Nicolas Apr 25 '14 at 22:32

Since $X\sim \mathrm{Bin}(n=12,p=\dfrac{5}{22})$, then you need to find $$\sum\limits_{x=1}^{12}x{12\choose x}\left(\dfrac{5}{22}\right)^x\left(\dfrac{17}{22}\right)^{12-x}$$ Luckily, since it is well known that $E(X)=np$, for $X\sim\mathrm{Binomial}$ then that's all you need to calculate

The expected value of a single trial is as follows, where $P$ is the probability of an event and $V$ is the value.

$$E(\text{1 trial}) = P(\text{blue})V\text({blue}) + P(\text{red})V\text({red})$$

Since you only care about blue balls, $V\text({blue}) = 1$ and $V\text({red}) = 0$.

Because you leave it in the jar, the trials are independent and the expected value of each trial is the same. So you just multiply by your number of trials to get the expected value for all of them.

• The independence is not needed, the expectation would be the same even without replacement. – André Nicolas Apr 25 '14 at 22:50
• @AndréNicolas Interesting, I didn't realize that it'd all cancel out. Thanks. – RandomUser Apr 26 '14 at 8:00
• You are welcome. The linearity of expectation (in all cases, independence not needed) is very useful, since it often enables us to bypass the details of the distribution when finding expectation. – André Nicolas Apr 26 '14 at 11:42