Number of times I need to roll a dice to get two $6$s We toss a dice until we get two $6$s. What is the most likely number of times we need to toss the dice?
My attempt:


I tried to simulate this in python, which always gives an answer of roughly 12. This answer makes sense to me. However I also tried to find
$$ \frac{\mathbb{P}(X = n+1)}{\mathbb{P}(X=n)} \leq 1,$$
with
$$\mathbb{P}(X=n) = \left(\frac{5}{6}\right)^{n-2} \cdot \frac{1}{6} \cdot\left(n-1\right) \cdot \frac{1}{6}  ,$$
where the $\left(n-1\right) \cdot \frac{1}{6}$ is the probability of first 6, and it's possible locations,  $\left(\frac{5}{6}\right)^{n-2}$ being the other non 6-s, and the last $\frac{1}{6}$ being the last 6 where we stop tossing. This gives me $n \geq 6$ as an answer, which I'm sure is wrong intuitively. I tried to solve this because I think this should be a normal distribution case (although I can't formally say why) and thus there must $\exists x : \forall y \in \mathbb{R^+}, y \neq x : \mathbb{P}(X=y) \leq \mathbb{P}(X=x)$
Can someone please point me out my mistake here?
 A: The number of rolls needed to get two sixes does not follow a normal distribution; it follows a negative binomial distribution, which in this case is the sum of two geometric distributions with success rate $\frac16$ (a success being a roll of six).
The computation of the first $n$ where $\frac{P(X=n+1)}{P(X=n)}\le1$ does not give the mean either. It gives the mode.
A: Your expression for the probability that $X=n$ is correct, and using it to calculate the expected value of $X$ by brute force from the definition yields the correct answer:
$$\begin{align*}
\sum_{n\ge 2}\frac{n(n-1)5^{n-2}}{6^n}&=\frac1{6^2}\sum_{n\ge 2}n(n-1)\left(\frac56\right)^{n-2}\\
&=\frac1{6^2}\cdot\frac2{\left(1-\frac56\right)^3}\\
&=12\,.
\end{align*}$$
To evaluate that sum I started with the fact that $$\sum_{n\ge 0}x^n=\frac1{1-x}$$ and differentiated twice to find that
$$\sum_{n\ge 2}n(n-1)x^{n-2}=\frac2{(1-x)^3}\,.$$
A: You may be mixing up the concept of "expected value" and "mode" of a random variable.
If the question is really "What is the mostly likely number", then $6$ and $7$ are the correct answers, as strange as that may seem. You can use your forumula in Phyton to verify that.
If the question is "What is the expected number", then $12$ is the correct answer.
You can at least make this plausible by looking at the following plot.

The function $f(n)=\frac{n-1}{36}\left(\frac56\right)^{n-2}$ (extended to real arguments) has it's max value between $6$ and $7$, so the maximum on integer arguments is either $6$ or $7$, and it turns out both values are the same (your formula $\frac{\mathbb{P}(X = n+1)}{\mathbb{P}(X=n)} = \frac56\frac{n}{n-1}$ yields exactly $1$ for $n=6$).
The expected value, however, is an integral over the whole argument axis. And while the curve above shows a continuous function over the real argument axis and the random variable under consideration is discrete, so it's expected value is a finite sum of value times probability for integer coordinates, for a plausibility check it is enough to consider the continuous curve as an approximation.
The curve increases fast, but falls slowly. It's not symmetrical, so the point of highest value will not be the expected value, which will instead be to right of it, somewhere in the "long tail".
So while this does not show that $12$ is indeed the expected value, it makes it plausible that maximum of probability ("mode") and expected value are not the same or necessarily near each other.
