# Expected number of trials until $n$ number of occurrences of some events

Suppose we have some independent trials with outcomes $1,2$ with probabilities of $p_1$ and $p_2$ and $p_1+p_2=1$. Now suppose we have the expected number of trails until 1 occurs $n$ times $E(X_n)=a$ and expected number of trails until 2 occurs $n$ times $E(Y_n)=b$. Now if I want to find the expected number of trials until 1 or 2 occurs $n$ times can I say that it is $a+b$? I am pretty sure this is wrong but any help is appreciated. Thanks

• It has to be shorter than either $a$ or $b$ because you have added a new stopping criterion. – Ross Millikan Sep 17 '17 at 0:04
• @RossMillikan So maybe $ap+bq$ where $p,q$ is the probabilities of getting 1,2 three times – Heisenberg Sep 17 '17 at 0:09
• This may help: math.stackexchange.com/questions/1426171/… – cr001 Sep 17 '17 at 0:55
• Why don't $a$ and $b$ depend on $n$? What is variate $X_n$? and $Y_n$? Can we think of this process as adding pebbles of two weights (1 and 2) randomly to bucket 1 and bucket 2 according to the probabilities $p_1$ and $p_2$, respectively? – minmax Sep 17 '17 at 1:08

## 1 Answer

First I think you need to work out the probability that 1 occurs n times given that 2 hasn't occurred n times (P1n, say) and vice versa.

There you can work out E(Xn | not(Yn) ) and vice versa easily enough. And the answer you are looking for should be P1n.E(Xn | not(Yn)) + P2n.E(Yn | not(Xn)).

Sorry for the poor formatting. This is my first answer. Perhaps someone can help out with that.

• I see. I will try to work on this. Thank you! – Heisenberg Sep 17 '17 at 0:54