I just asked this question, but worded it wrong so while the given answers are useful, they still leave me confused for where I am in the progression through my stats book.

My problem is I've got 3 balls chosen (with replacement) out of 6, of which 2 of the 6 are blue. What is the expectation and variance of the number of blue balls picked?

In my original question, I included the idea of "chance" (see here: Probability of particular subset of balls occurring in a larger set chosen from a total?), but that lead to a discussion of the binomial theorem, which I have not yet come to in my book, so it can't be expected in the answer (and is a bit ahead of me).

So far, I've covered expectation and variance of random variables, and probability theory. I have a very hard time with probability theory, so that's what is killing me here.

My approach here is that this uses linear combinations of element expectations and variances, but I'm at an almost total loss as to how to find the probabilities of these blue balls in the selection of 3, to establish a probability mass function that can be used for expectation and variance calculations.

In organizing the problem, I've got four conditions, where the number of blue balls is 0, 1, 2, and 3, but how to use combinations for finding the relative probabilities of each leaves me at a blank.

I know I'm choosing 3 out of the 6, so the possible combinations are: 6!/(3!(6-3)!) = 20. However, this being "with replacement" means that we'd be using permutations for establishing the number of possibilities of choosing 3, and not combinations, so this would be 6!/3! = 120, right?

I'm guessing this means that we'd need to find the possible permutations of 3 that include 0 balls, and divide this by 120 to get the probability, and then repeat for 1, 2, and 3? I'm not seeing how to do this part...


Thanks! That seems to explain it a bit, but I'm confused as this is a question in my book where I have not even touched the binomial distribution. I've just covered linear combinations and expectation of random variables. I did word it slightly differently, where they specifically ask for the expectation and variance of the number of blue balls picked (In slightly rewording it (my mistake), using "chance" might have lead to the binomial distribution discussion. I think its very valuable, but I'm still confused.

Okay.   In this case let $X_i$ be the Boolean indicator that a favoured item is drawn on the $i^{th}$ draw.   Then since there are two favoured items in the population of six, then: $\mathsf E(X_i)= 1/3$ for all draws.   (Interestingly this bit is true whether we are drawing with or without replacement.)

The count of favoured items drawn in a run is the sum of the indicators. $$X=\sum_{i=1}^3 X_i$$

Since expectation is linear the expected count of favoured items in the run is the sum of the expected value of these indicators. $$\begin{align}\mathsf E(X) & = \mathsf E(\sum_{i=1}^3 X_i) \\ & = \sum_{i=1}^3 \mathsf E(X_i) \\ & = 1\end{align}$$

The expected square of the count is slightly more involved.

$$\begin{align} \mathsf E(X^2) & = \mathsf E(\sum_{i=1}^3 X_i \sum_{j=1}^3 X_j) \\[1ex] & = \mathsf E\left(\sum_{i\in\{1,2,3\}} X_i^2 + \mathop{\sum\sum}_{ \substack{ i\in\{1,2,3\}\\[0ex] j\in \{1,2,3\}\setminus\{i\}}} X_iX_j\right) \\[1ex] & = 3\mathsf E(X_i^2) + 6\mathsf E(X_iX_j\mid i\neq j) \\[1ex] & = 3(\tfrac 1 3) +6(\tfrac 1 9) \\[2ex] & = \tfrac 5 3 \end{align}$$

The second last step trips people up when the first encounter it. $$\begin{align} \mathsf E(X_i^2) & = 1^2\;\mathsf P(X_i=1) + 0^2\;\mathsf P(X_i=0) \\[1ex] & = \tfrac 1 3 \\[2ex] \mathsf E(X_iX_j\mid i\neq j) & = 1\cdot\mathsf P(X_i=1\cap X_j=1)+ 0\cdot\mathsf P(X_i=0 \cup X_j=0) \\[1ex] & = \tfrac 1 9 \end{align}$$

You know have the mean and enough to find the variance, since $\mathsf{Var}(X)=\mathsf E(X)^2-\mathsf E(X)^2$

NB: If we are drawing without replacement then $$ \begin{align} \mathsf E(X_iX_j\mid i\neq j) & = \dfrac {\quad\binom{2}{2}\quad}{\binom{6}{2}} \\[1ex] & = \tfrac 1 {15} \\[2ex] \therefore \mathsf E(X^2) & = \tfrac 7 5 \end{align}$$

  • $\begingroup$ Your responses have been amazing! I can't thank you enough for bearing with me and outlining these detailed responses both here and in the last thread (which will be exceptionally useful as I get into the next chapter of my book). This is exactly what I'm looking for. It turns out I $\endgroup$ – Topher May 6 '15 at 17:07
  • $\begingroup$ It turns out I've been looking at permutations and combinations completely wrong...have for some reason been seeing a permutation as a combination with replacement, but that has never made sense to me so it's been frustrating. I'm still hashing it out a bit, but having clarified that, its far easier to understand the logic here. Thanks again! $\endgroup$ – Topher May 6 '15 at 17:09


In organizing the problem, I've got four conditions, where the number of blue balls is 0, 1, 2, and 3, but how to use combinations for finding the relative probabilities of each leaves me at a blank.

Let $X$ be the count of blue balls drawn (we call these successes).   As you noticed, this takes on values of $\{0,1,2,3\}$ with various probabilities.   How do we calculate these?   Let's see.

The probability of drawing a blue ball on any trial is $1/3$, because we have two blue balls in a population of six, and we a drawing with repetition.   Each of these draws are independent and identically distributed.

The probability of drawing $k$ blue balls in a row, followed by $3-k$ other balls, is $(\tfrac 1 3)^k(\tfrac 2 3)^{3-k}$.   This is a straight application of the Product Rule for Independent Events.

However, that is just one way we can draw that many blue and not-blue balls.   There are $3!/k!\,(3-k)!$ permutations of these results.

Thus the probability of drawing exactly $k$ blue balls in any order is: $$\begin{align} \mathsf P(X=k) & = \frac{3!}{k!\,(3-k)!} \frac{2^{3-k}}{3^3} \\[1ex] & = \frac{2^{4-k}}{k!\,(3-k)!\,3^2} \end{align}$$

So we move onto the expectations:

$\begin{align} \mathsf E(X) & = \mathsf P(X=1)+2\mathsf P(X=2)+3\mathsf P(X=3) \\[1ex] & = \frac{2^{3}}{1!\,2!\,3^2}+\frac{2\cdot 2^{2}}{2!\,1!\,3^2}+\frac{3\cdot 2^{1}}{3!\,0!\,3^2} \\[1ex] & = \frac{4}{9}+\frac{4}{9}+\frac{1}{9} \\[1ex] & = 1 \\[2ex] \mathsf E(X^2) & = \mathsf P(X=1)+4\mathsf P(X=2)+9\mathsf P(X=3) \\[1ex] & = \frac{4}{9}+\frac{8}{9}+\frac{3}{9} \\[1ex] & = \frac 5 3 \end{align}$

  • $\begingroup$ I'm a little confused when you say "3!/k!(3−k)! permutations"...isn't this the formula for combinations? $\endgroup$ – Topher May 6 '15 at 17:13
  • $\begingroup$ @Topher Yes; it's both. It's the formula for counting distinct permutations of $k$ indistinct objects and $3-k$ other indistinct objects; which are the balls, in this case. It is also the formula for counting the ways to select $k$ objects from $3$ distinct objects, which are the positions of the draws, in this case. Different ways to perform the same task have the same count. $\endgroup$ – Graham Kemp May 6 '15 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.