Roll a dice till consecutive sixes - Generating Function

189 Views Asked by At

Consider the following experiment: A fair dice is thrown until two consecutive sixes are rolled. Let $X$ be the number of rolls of the experiment. I need to find the probability generating function of $X$ and then use it to find $E(X)$. I tried doing this and got a non-sensical result ($E(X)<1$, which is absurd since $X≥2$). Now, I would appreciate if someone could tell me whether my strategy is correct probability-wise, and if not give me a hint on how to do it. If it were to be correct I’ll blame the result on some arithmetic mistake.

Fix $n$ and suppose the dice is rolled $n$ times, and define: $$c_n=\text{number of sequences of $n$ rolls with no two consecutive sixes}$$

Now, if the first roll is not a $6$ (there are $5$ possibilities), the remaining $n-1$ rolls can occur in $c_{n-1}$ ways. If the first roll is a $6$, the second must not be a $6$ (again, 5 possibilities), and the remaining $n-2$ can occur in $c_{n-2}$ ways. In other words: $$c_n=5c_{n-1}+5c_{n-2}$$

We define $c_0=1$, and since $c_1=6$ we observe our formula holds for $n≥2$.

Now, if $X=k$, with $k≥3$, this means the last $2$ rolls where sixes, the $(n-2)$-th roll was not a six, and the first $n-3$ rolls can take $c_{k-3}$ different “values”. By the independence of the rolls we obtain:

$$f_x(k)=P[X=k]= \left ( {1 \over 6} \right )^2 \left ( {5 \over 6} \right ) {c_{k-3} \over 6^{k-3}}={5c_{k-3} \over 6^k} \ , \ k≥3$$

Then $G_x(t)=\displaystyle \sum_{k=0}^\infty f_x(k)t^k = {t^2 \over 36} +\sum_{k=3}^{\infty}{5c_{k-3} \over 6^k}t^k$

We then use the recurrence relation for $c_n$ to find $G_x$. I wont bore you with the details since its a matter of working with the series and no longer a probability question.

Is there any error up to this point?

Thanks in advance!