Probability - die - The number of throws until a $5$ and a $6$ have been obtained. An unbiased die is thrown repeatedly until a 5 and a 6 have been obtained. the random variable M denotes the number of throws required. For example, for the sequence of results 6,3,2,3,6,6,5, the value of M is 7. Calculate P(M=r).
 A: Let $X_1$ be the number of throws until either a $5$ or a $6$ appears, 
and let $X_2$ be the number of additional throws until the other one appears. 
Then $X = X_1 + X_2$ is the total number of throws required, 
where $X_1$ and $X_2$ are independent geometric random variables 
with parameters $p_1 = 1/3$ and $p_2 = 1/6$, respectively.
A: Our required probability is $\Pr(M\gt r-1)-\Pr(M\gt r)$.
We find $\Pr(M\gt n)$. We have $M\gt n$ if in the first $n$ tosses, $5$ is missing, or $6$ is missing, or both are missing. The probability $5$ is missing is $(5/6)^n$. The probability $6$ is missing is the same. The probability  both are missing is $(4/6)^n$. Thus $\Pr(M\gt n)=(5/6)^n+(5/6)^n-(4/6)^n$.
A: Let's say the $r$-th one is $6$. Then in the previous $r-1$ throw, you must have at least one $5$. That means at the same time you cannot have $6$. So you can have one $5$ and $(r-2)$ $1-4$, or two $5$ and $(r-3)$ $1-4$, ... etc.
So the probability is
$$P=\frac{1}{6}\sum_{i=1}^{r-1}C^{r-1}_i \left(\frac{1}{6}\right)^i\left(\frac{2}{3}\right)^{r-2-i}$$
$$=\frac{1}{6}\bigg[\left(\frac{1}{6}+\frac{2}{3}\right)^{r-1}-\left(\frac{2}{3}\right)^{r-1}\bigg]$$
$$=\frac{1}{6}\frac{5^{r-1}-4^{r-1}}{6^{r-1}}$$
Finally, switching the role of $5$ and $6$ means doubling the probability, so
$$P=\frac{1}{3}\frac{5^{r-1}-4^{r-1}}{6^{r-1}}$$
