[Math] Expectation of a Sum of Random Variables

expected valueprobabilityprobability distributions

An urn contains n+m balls of which n are red and m are black. They are withdrawn from the urn one at a time and without replacement. Let $X$ be the number of red balls removed before the first black ball is chosen. We are interested in determining the $E[X]$. To obtain this quantity, number the red balls from 1 to n. Define the random variables $X_i$ $(i=1,2…,n)$ by

$$X_i =
\begin{cases}
1 \quad & : \text{if red ball labeled (i) is taken before any black ball is chosen}\\
0 \quad & : \text{otherwise} \end{cases}$$

  1. Express $X$ in terms of $X_i$s and find $E[X]$.

the probability Red Ball $i$ is drawn before any black is $\frac{1}{m+1}$.

The Bernoulli random variable $X_i$ takes on value $1$ with probability $\frac{1}{m+1}$, and therefore $E(X_i)=\frac{1}{m+1}$.

By the linearity of expectation we then have $E(X)=E(X_1)+\cdots+E(X_n)=\frac{n}{m+1}$.

  1. Now let $Y$ denote the number of red balls chosen after the first but before the second black ball has been chosen. Compute the new $E[Y]$

The main problem here is computing the probability that the red ball is chosen after and before the black ball. I am thinking that event is equivalent to selecting a red ball given we chose a black ball first. Hence equal to $\frac{1}{m} \frac{1}{m}$ as we are selecting one red from $m$ left black balls.

Best Answer

For each red ball, the $m+1$ balls consisting of that red ball and the $m$ black balls are equally likely to be arranged in any of their $(m+1)!$ permutations. Thus, the red ball has equal probability $\frac1{m+1}$ to be in any of the possible $m+1$ positions among these $m+1$ balls. Thus, the probability for $2$) is the same as for $1$).