Example 7.4.3. Flipping a die until getting a third success.

Once again, consider rolling our 24-sided die until you get a multiple of 9...that is, either a 9 or an 18...for the third time. Once again, the probability of getting a 9 or 18 on any given roll is \(p = \frac{1}{12}\) but since we will continue rolling until we get a success for the third time, this is modeled by a negative binomial distribution and you are looking for
\begin{equation*} f(x) = \binom{x-1}{2} \left ( \frac{11}{12} \right )^{x-3} \left ( \frac{1}{12} \right )^3 \\ = \frac{(x-1)(x-2)}{2} \left ( \frac{11}{12} \right )^{x-3} \left (\frac{1}{12} \right )^3 \end{equation*}
Computing f(x) for any given x is relatively painless but computing F(x) could take some effort. There is generally not a graphing calculator distribution option for negative binomial but the interactive cells below can be utilized to help with the tedious computations. For example, if you were interested in \(P(X \lt 20) = P(X \le 19 ) = F(19)\) then the interactive calculator below using r=3 and \(p = \frac{1}{12}\) gives \(F(19) \approx 0.20737.\)
in-context