Assume Independent trials, resulting in one of the outcomes 1, 2, 3, 4, 5 with respective probabilities $p_i$ for $i=1,2,3,4,5$ and $\sum_i p_i = 1$
Let $Z$ be the number of trials needed until the initial outcome has occurred exactly $5$ times. example: if we get $1,3,3,4,1,1,1,2,1$ then $Z=9$
1. We want $E[Z]$
2. Find the expected number of trials needed until both outcome $1$ and outcome $2$ have occurred?
For question 1, I condition on the first outcome $O_i = 1,...,5$:
$$E[Z] = E\bigg[E[Z|O_i] \bigg] = \sum_i p_i E[Z|O_i]$$
I am thinking $E[Z|O_i]=1+ $ something. I get stuck here. Any insight?