I'm having hard time figuring out the following question.
Suppose that for each k, there is a box containing k red marbles n-k green marbles. $(k=0,1,2,...,n)$ One box is chosen from these $n+1$ boxes, and then two marbles are selected at random without replacement from the chosen box. Find the probability that to marbles are red.
Initially I thought,
$$\binom{n+1}{1}\binom{n}{k}\binom{n-1}{k-1}$$ would be the number of ways to choose a box among $n+1$ boxes, and first and second red marble respectively. However, I got stuck, how do I even compute the sample space?
Let $X$ be the box you sampled and $Y$ is the # of red marbles if you sample two marbles from $X$. Then $$ \Pr(Y = 0 | X = k) = \frac{{n-k \choose 2}}{n \choose 2} = \frac{(n-k)(n-k-1)}{n(n-1)} $$ Therefore, \begin{align} \Pr(Y = 0) &= \sum_{k=0}^n \Pr(Y = 0 |X = k)\Pr(X = k) \\ &= \sum_{k=0}^n \frac{(n-k)(n-k-1)}{n(n-1)}\cdot \frac{1}{n+1} \\ &= \frac{1}{(n+1)n(n-1)}\cdot \sum_{k=0}^n (n-k)(n-k-1) \\ &= \frac{1}{(n+1)n(n-1)}\cdot \sum_{k=0}^n k(k-1) \end{align} Use $\sum_{k=0}^n k^2 = \frac{n(n+1)(2n+1)}{6}$ and $\sum_{k=0}^n k = \frac{n(n+1)}{2}$ to simplify the formula above.