What is the expected number of die rolls to get 6 given that die values do not decrease?
For example, $1, 1, 2, 6$ is accepted and $1, 3, 2, 6$ is not.
What is the expected number of die rolls to get 6 given that die values do not decrease?
For example, $1, 1, 2, 6$ is accepted and $1, 3, 2, 6$ is not.
To be clear: I am assuming that a trial consists of throwing a fair die until a $6$ is thrown, then discarding the sequence if at some point it decreased. We then want the average length of the surviving sequences.
Let $A_n$ be the number of non-decreasing sequences of length $n$ made from $\{1,2,3,4,5\}$.
Since any such sequence is of the form $1^{a_1}2^{a_2}\cdots 5^{a_5}$ with $a_i$ non-negative integers and $\sum a_i=n$, Stars and Bars tells us that $$A_n=\binom {5+n-1}{n}$$.
Thus the probability that you throw a non-decreasing sequence and then throw a $6$ for the first time on the $n^{th}$ roll is $$\frac {A_{n-1}}{6^n}=\binom {5+n-2}{n-1}\times \frac 1{6^n}$$
It follows that the answer is $$E=\frac {\sum_{n=1}^{\infty} n\times \binom {5+n-2}{n-1}\times \frac 1{6^n}}{\sum_{n=1}^{\infty}\binom {5+n-2}{n-1}\times \frac 1{6^n}}=2$$
(Final evaluation checked by WA)
Note: as remarked in the comments, the method works for an $N$ sided die and, for $N>1$, always yields $2$. That strongly suggests that there is an underlying principle involved here, but as yet I have not spotted it.
Let’s see how often we expect to roll a particular number $k$, given that the results don’t decrease. Whatever other numbers we roll in non-decreasing order, ending in a $6$, there’s exactly one slot at which we could insert any number $m$ of $k$s and still have a non-decreasing sequence. This insertion multiplies the probability for the sequence by $p^m$, where $p=\frac1n$ is the probability to roll $k$ (where $n$ is the number of sides of the die). So the conditional expectation for the number $M$ of $k$s factorizes, and the probabilities for the other numbers cancel:
\begin{eqnarray} \mathsf E[M\mid\text{non-decreasing}] &=& \frac{\sum_{S\in\mathcal S}\sum_{m=0}^\infty\mathsf P(S)p^mm}{\sum_{S\in\mathcal S}\sum_{m=0}^\infty\mathsf P(S)p^m} \\ &=& \frac{\left(\sum_{S\in\mathcal S}\mathsf P(S)\right)\sum_{m=0}^\infty p^mm}{\left(\sum_{S\in\mathcal S}\mathsf P(S)\right)\sum_{m=0}^\infty p^m} \\ &=& \frac{\sum_{m=0}^\infty p^mm}{\sum_{m=0}^\infty p^m} \\ &=& \frac{p/(1-p)^2}{1/(1-p)} \\ &=& \frac p{1-p} \\ &=& \frac1{n-1} \;, \end{eqnarray}
where $\mathcal S$ is the set of admissible sequences of the other numbers.
Thus, each of the $n-1$ numbers other than $6$ is expected to appear $\frac1{n-1}$ times, so in total we expect one number to appear before the $6$. Together with the one $6$, that makes an expected total of $2$ rolls.
We can use this approach to solve the problem for a general die with probability $p_k$ for the $k$-th face to appear. The equiprobability of the faces wasn’t used until the last step, so in this case the expected number of rolls is
$$ 1+\sum_{k=1}^{n-1}\frac{p_k}{1-p_k}\;. $$
We can also ask how many rolls we’d expect given that the results are strictly increasing. This is
\begin{eqnarray} \mathsf E[M\mid\text{increasing}] &=& \frac{\sum_{m=0}^1p^mm}{\sum_{m=0}^1p^m} \\ &=& \frac p{1+p}\;, \end{eqnarray}
so in this case the expected number of rolls is
$$ 1+\sum_{k=1}^{n-1}\frac{p_k}{1+p_k}\;. $$
For equiprobable sides, this is
$$ 1+\sum_{k=1}^{n-1}\frac{\frac1n}{1+\frac1n}=\frac{2n}{n+1}\;, $$
which is slightly less than $2$ but goes to $2$ as $n\to\infty$ and equal sides become unlikely.
As might be expected, the result for non-decreasing sequences is minimized for equiprobable faces and goes to infinity as one of the probabilities $p_k$ approaches $1$, whereas the result for increasing sequences is maximized for equiprobable faces.