Consider a russian roulette game and suppose that there are $m$ chambers and $1$ bullet. In a problem one is asked to find the mean value of the number of times that a player has the chance of pulling the trigger.
I did the following: since there are $m$ chambers, the probability in one turn that the player will be alive is $p = \frac{m-1}{m}$.
In that case, consider the random variable $X$ taking values in $\mathbb{N}$ whose value is the number of times a player has played.
The probability of being alive after $n$ turns (assumed to be indepedent) can easily be found to be $p^n$ which is $p^n=\frac{(m-1)^n}{m^n}$.
Thus, the probability distribution $P(X=n)$ can be found considering that: the player having played $n$ turns means that he survided this $n$ turns. This is the same probability as above and hence $P(X=n)=p^n$.
The mean value then becomes
$$\langle X\rangle=\sum_{n=1}^\infty n P(X=n)=\sum_{n=0}^\infty n p^n=p\dfrac{d}{dp}\sum_{n=0}^\infty p^n=p\dfrac{d}{dp}\dfrac{1}{1-p}=p\dfrac{1}{(1-p)^2}.$$
But $1-p = \frac{1}{m}$ and hence $(1-p)^{-2}=m^2$, from where we obtain
$$\langle X \rangle = \frac{m-1}{m} m^2=m^2-m.$$
I believe this is wrong. In one book with this problem, considering $m=6$ the solutions says that $\langle X \rangle = 6$.
This would be the case if we had
$$\langle X\rangle = \sum_{n=0}^\infty p^n=\dfrac{1}{1-p}=m,$$
but this doesn't seem to make much sense, after all this would be the mean value of a random variable whose values are all $1$ with probabilities $p^n$ each.
So: is my approach correct? If not, where am I getting this wrong?
To have $X=n$, the player must have clicked on empty chambers for the first $n-1$ turns and then had the ill fortune of finding the loaded chamber on the $n$th go. Therefore, $$\Pr(X=n) = \left({m-1 \over m}\right)^{n-1}\left(\frac1m\right) = \frac1m p^{n-1},$$ and so $$E[X] = \frac1m \sum_{n=1}^\infty np^{n-1} = \frac1m\frac1{(1-p)^2} = \frac{m^2}m=m.$$