I've tried rephrasing the question to something more traditional.
Say I have $N_0$ marbles in a bag to start with, and I keep removing marbles, but, with a probability $p$ of being replaced / put pack in the bag each time.
How many trials $n$ until I get a completely empty bag?
My attempts so far have been:
- To model $Y\sim\textrm{Bernoulli}(p)$ to be the amount of marbles being added back to the bag each time (0 or 1 marbles), then say each time a marble is drawn, there are $N - 1 + Y$ in the bag given there were $N$ previously. And so say the amount of marbles after $n$ trials is $N_0 + n(Y - 1)$, and when this is zero, we have $n=\frac{N_0}{1-Y}$, so the expected number of trials is $\mathbb{E}[n] = N_0\cdot \mathbb{E}\left[\frac{1}{1-Y}\right]$, but this is undefined when $Y=1$ so I'm not sure how/if I can calculate this expectation.
- To model $X\sim\textrm{Bin}(n, p)$, where $X$ is the number of marbles replaced after removing $n$ marbles from the bag, with chance of replacement $p$. Then the marbles left is $N_0 - n + X$, so when there are none left, $X = n - N_0$. But I got stuck trying to essentially solve for $n$, since $X$ depends on $n$. Since $\mathbb{E}[X] = np$ and $n$ here is supposed to be the expectation, Can I say that $\mathbb{E}[X] = \mathbb{E}[n]\cdot p$, and so $n=X+N_0 \implies \mathbb{E}[n] = \mathbb{E}[X] + N_0 = \mathbb{E}[n]\cdot p + N_0$, so $\mathbb{E}[n] = \frac{N_0}{1-p}$? I suppose what's confusing me is the mixture of RVs in RVs, and $n$ being in the parameter of the distribution.
I only really know the basics of probability theory, thank you in advance.
We can reduce this to the case of $N_0 = 1$. The expected time to go from $N_0$ to $0$ marbes is the time taken to go from $N_0$ to $N_0-1$, then $N_0-1$ to $N_0-2$ etc. until you reach 0. And this transition time doesn't depend on how many marbles you have. So the expected time taken is just $N_0$ times the expected time for 1 marble. When you consider the 1 marble case, after 1 turn, there are 2 possibilities: either it's over, or you're back to where you started. So if $x$ is the expected number of turns, you know that $x$ is the expected number of extra turns after the first one, $+1$. This is $px+(1-p)*0$
so $x = 1+px$ so $x = 1/(1-p)$