A pair of dice is rolled repeatedly until it turns up doubles for the 9th time.
a) Write the probability mass function for the number of rolls until this happens.
b) What is the probability it will take exactly 50 rolls (rounded to the nearest percent)?
I have tried: (nC9)(5/6)^n-9(1/6)^9
$$^n\mathsf C_9{(\tfrac 56)}^{n-9}{(\tfrac 16)}^9$$
Probability of a success (double) is ${6\over 36} = {1\over 6}$ Number of trials until 9 successes is a Negative Binomial random variable with parameters $r=9$ and $p=\frac{1}{6}$
$P(X=n)={n-1\choose r-1}p^r(1-p)^{n-r}$ for $n=r,r+1...$
So for this case:
$P(X=n)={n-1\choose 8}\left(\frac{1}{6}\right)^9\left(\frac{5}{6}\right)^{n-9}$ for $n=9,10,11...$
$P(X=50)={49\choose 8}\left(\frac{1}{6}\right)^9\left(\frac{5}{6}\right)^{41}\approx 3\%$