In a coin tossing game, I have access to infinite number of unfair coins. The game follows as described below.
We take a coin and toss it till we get $m$ tails. Once we get $m$ tails, we remove that coin, sample a new coin and continue the game. The game continues till total number of trials hit $n$. I am trying to find the expected number of tails conditioned on the number of coins used.
The random variable $Y_i=1$ indicates $i^{th}$ coin is the last coin with $m$ tails. The random variable $X_i = 1$ indicates the probability of selecting the $i^{th}$ coin. Let $C$ be the random variable denoting the number of coins used and for $C=c$, the expected number of tails is
$$ \mathbb{E}(T|C=c) = m\big(P(X_1=1) + P(X_2=1,Y_1=1) + \cdots + P(X_{c-1} = 1,Y_{c-2}=1)\big) + (n-m(c-1))P(X_c = 1,Y_{c-1}=1) $$
Now, $$ P(Y_1=1) = P(X_1=1) = \frac{c}{c+1} \\ P(Y_2=1) = P(X_2 = 1,Y_1=1) = P(X_2=1|Y_1=1)P(Y_1=1) = \frac{c-1}{c} \frac{c}{c+1} = \frac{c-1}{c+1}\\ P(Y_3=1) = P(X_3 = 1, Y_2=1) = P(X_3=1|Y_2=1)P(Y_2=1) = \frac{c-2}{c-1}\frac{c-1}{c+1} = \frac{c-2}{c+1}$$
Following this way, I get
$$ \mathbb{E}(F|C=c) = m\Big(\frac{c}{c+1} + \frac{c-1}{c+1} \dots \frac{2}{c+1}\Big) + n-(c-1)m\frac{1}{c+1} $$
Is this calculation correct ? Thanks in advance
For convenience I will use $c$ for the number of removed coins. Assuming the coins being fair the probability of $k$ tails is proportional to the number of ways to permute them with heads. Besides we know that $mc\le k<m(c+1)$. Therefore the expected number of tails is: $$ mc+\frac{\sum_{i=0}^{m-1}i\binom n{mc+i}}{\sum_{i=0}^{m-1}\binom n{mc+i}}. $$