In roulette, there are $38$ slots the ball can fall into. $18$ are red, $18$ are black, and $2$ are green.
If a roulette wheel receives $100$ spins per evening, what is the chance that $5$ consecutive reds will occur sometime during the evening?'
Attempted Solution:
I used the formula provided by Byron here: Probability for the length of the longest run in $n$ Bernoulli trials. I found that the probability is $.7295$. Intuitively, it sounds like this makes sense. However, I calculated this in excel, and excel stopped being able to compute the combinatorial portion of the formula due to extremely small values. For this reason I neglected those particular values.
In order to make sure I answered this correctly, I was hoping someone knew another way to solve this, whether it be a programming language you know or if you know how to run a Monte Carlo simulation in excel. Neither of which I know how to do.
Any help would be much appreciated.
(This implements ShawnD's answer to the question you link to).
We can write down a recurrence for
Namely, $$ \begin{bmatrix} a_{n+1} \\ b_{n+1} \\ c_{n+1} \\ d_{n+1} \\ e_{n+1} \end{bmatrix} = \frac{1}{38}\begin{bmatrix} 20 & 20 & 20 & 20 & 20 \\ 18 & 0 & 0 & 0 & 0 \\ 0 & 18 & 0 & 0 & 0 \\ 0 & 0 & 18 & 0 & 0 \\ 0 & 0 & 0 & 18 & 0 \end{bmatrix} \begin{bmatrix} a_n \\ b_n \\ c_n \\ d_n \\ e_n \end{bmatrix} $$ with the initial conditions $a_0 = 1$, $b_0=c_0=d_0=e_0=0$.
The probability we're looking for is to compute one minus the sum of the first column of $$ \begin{bmatrix} 20/38 & 20/38 & 20/38 & 20/38 & 20/38 \\ 18/38 & 0 & 0 & 0 & 0 \\ 0 & 18/38 & 0 & 0 & 0 \\ 0 & 0 & 18/38 & 0 & 0 \\ 0 & 0 & 0 & 18/38 & 0 \end{bmatrix} ^{100}$$
With a linear-algebra library, raising a 5×5 matrix to the 100th power is quite quick and painless (using exponentiation by squaring it takes only 8 matrix multiplications). Or Wolfram Alpha can do it for us, giving $$ \begin{bmatrix} 0.144322 & 0.14023 & 0.131708 & 0.113959 & 0.0769927 \\ 0.0692934 & 0.0673289 & 0.0632374 & 0.0547155 & 0.0369667 \\ 0.03327 & 0.0323268 & 0.0303623 & 0.0262707 & 0.0177489 \\ 0.015974 & 0.0155211 & 0.0145779 & 0.0126134 & 0.00852181 \\ 0.00766962 & 0.00745219 & 0.00699932 & 0.0060561 & 0.00409159 \end{bmatrix}$$ So we have $$ 1-0.14432-0.06929-0.03327-0.01597-0.00767 = 0.72948 $$ which is consistent with your result.