0

Q - What is the probability of rolling a dice k times before a certain sequence appears (for example 1,2,3,4,5,6). Another way of asking is: consider a random sequence $\{a_{n}\}_{n=1}^\infty$, $p_k$ denotes the probability where k is the lowest integer for $(a_{k+1},\ldots,a_{k+6})=(1,2,3,4,5,6)$ or $(1,1,1,1,2,2)$, what are the $p_k$s resp.? Moreover, what are the expectation values?

I am a sophomore student and this problem appeared to me this afternoon as I was reviewing for a probability exam. I couldn't find any clue from my textbook. At first glance, the expectation seems to be $6^6$, but I doubt whether that's right and don't know how to prove it.

Jose Avilez
  • 12,710
  • Work examples. Convince yourself that $11$ has a different answer than $12$, the point being that, for $12$ if your last toss was a $1$ then two good things could happen next: either you throw a $2$ and end the game, or you throw another $1$ and you are still half way there. That option doesn't exist for $11$. – lulu Nov 03 '23 at 17:20
  • Exactly, that is the reason for why I think the question is worth being discussed: different sequences may yield to different probabilities. – SomeHilariousBottle Nov 03 '23 at 17:24
  • You can find more discussion here for example. – lulu Nov 03 '23 at 17:47

1 Answers1

0

It is easier to consider all sequences of $k + 6$ elements, where $k \in \mathbb{N}$. Among those, the sequences that end in the desired $6$ rolls can be constructed from all sequences of $k$ elements. Then for any $k \geq 0$, $$ q = q_k = \frac{\#\{\text{all sequences of }k\}}{\#\{\text{all sequences of }k+6\}} = \frac{6^k}{6^{k+6}} = \frac{1}{6^6}. $$ $q_k$ is not quite what you desire, because some of the sequences counted in the numerator may have a repeat of $(1,2,3,4,5,6)$. But $q_0 = p_0, \dots, q_5 = p_5$. When you get to index $6$, $$ q = q_6 = p_6 + \mathbb{P}(\text{twice certain sequence out of $12$}) \Rightarrow p_6 = \frac{1}{6^6} - \frac{1}{6^{12}}. $$ For higher indices, you can have one or more of the subsequences nested, and the number of arrangements depends on the extra space as well. In general, define $c := \lfloor \frac{k}{6} \rfloor$. Then you have $\{0, 1, \dots, c\}$ possible repetitions of the fixed sequence of 6 in $k$ elements, before the last fixed sequence. I'm going to consider the case where the fixed subsequence cannot overlap itself and be ambiguously located. So $(1,1,1,1,1,1)$ wouldn't work, but $(1,2,3,4,5,6)$ and your other example would work.

In that case, $$ p_k = \frac{6^k - \sum_{i = 1}^{c}{(k - 6i) + i \choose i}6^{k - 6i}}{6^{k+6}}. $$ This formula comes from noting that there are ${(k - 6i) + i \choose i}$ ways to arrange $i$ subsequences and the leftover $k - 6i$ elements, and those leftover elements can of course be chosen in $6^{k - 6i}$ ways.

Surge
  • 824