Say we want to collect two cards A and B, each appearing independently in the pack with probability $p$. Note that a pack may contain both A and B at the same time with probability $p^2$. I want to find the expected number of packs that I need to buy to until I obtain at least one A card and at least one B card.
My Attempt: We can have 3 possible events in the experiment where I draw packs until my condition is satisfied:
- $E_A$: obtaining an A before a B
- $E_B$: obtaining a B before an A
- $E_{AB}$: obtaining A and B at the same time
Let the probabilities of the above events be $p_A$, $p_B$ and $p_{AB}$ respectively. We have $p_A+p_B+p_{AB}=1$ and by symmetry $p_A=p_B$. We can compute $p_{AB}$ as the probability of getting a pack with A and B before seeing a pack with only A or a pack with only B (the latter two packs have a probability $p(1-p)$ each).
$$p_{AB} = \frac{p^2}{p^2 + 2p(1-p)}$$
Now, my approach was to use the law of total expectation. If X was the number of packs I had to buy, then
\begin{align} E[X] &= 2p_A E[X| E_A] + p_{AB}E[X|E_{AB}] \end{align} My intuition was that if I condition on the event that A or B appears first in a pack on their own, then I can possibly model the waiting time as the sum of two geometric random variables with parameter $p$.
And if I condition on them appearing at the same time ($E_{AB}$), it would be one geometric random variable with parameter $\frac{p^2}{p^2 + (1-p)^2}$ since I would be working with a reduced sample space with only packs that contain both or neither. I am having trouble justifying the step where I replace the conditional expectations with the geometric expectations. Is my intuition off here?
I'm not able to follow through with your approach, so I don't know if your result will match mine, but I think you may be overcomplicating things.
There are three possible outcomes for a pack:
I calculate the desired expected value as: $$E=(1-p)^2(1+E)+2p(1-p)(1+\frac{1}{p})+p^2$$ Which simplifies to: $$E=\frac{3-2p}{2p-p^2}$$