Independent tosses of a loaded die with probabilities $p_i$ , $i$ = 1, ..., 6, are performed.
- Let N denote the number of tosses until the initial outcome has occurred exactly 3 times. For instance, if the toss results are 4,3,4,5,1,6,2,4 then N = 8. Find E(N).
- Find the expected number of tosses needed until both 1 and 6 appeared. Compute it when the die is fair.
The expected number of rolls until you get number $i$ once is $\frac1{p_i}$. So the answer to problem 1, where you need to roll whatever number comes up first two more times, is $$ \sum_i p_i \left(1+2\frac1{p_i}\right) = \sum_i p_i + \sum_i 2\frac{p_i}{p_i} = 1 + 2\sum_{i=1}^6 1 = 13 $$
For the second one, first either 1 or 6 has to appear, then the other. So we start with the expectation for the combined probabilities, then add the weighted average of the expectation for the individual probabilities. So we have $$ \frac1{p_1+p_6} + \frac{p_1}{p_1+p_6}\frac1{p_6} + \frac{p_6}{p_1+p_6}\frac1{p_1} = \frac{p_1p_6+p_1^2+p_6^2}{(p_1+p_6)p_1p_6} $$ When the die is fair, this works out to be $9$