I have following problem: We throw a fair dice time after time.What is time expectancy to get first time 66 i.e two six in the row for the first time. I probably should use this http://en.wikipedia.org/wiki/Expected_value#Discrete_distribution_taking_only_non-negative_integer_values though I don't understand how.
Geometric distrubution and expectancy
-
0I made a numeric simulation to estimate the time and I get about 42. There you have it, the answer to THE question: Life, the Universe and everything. ;) – 2011-01-08
3 Answers
Let $x$ be the expected number of tosses to get one six. Then $x = \frac{5}{6}(1+x)+ \frac{1}{6}(1)$. So $x=6$. Let $y$ be the expected number of throws to two consecutive sixes. Then $y = \frac{1}{6}(x+1)+ \frac{5}{6}(x+1+y)$. So $y = 6(x+1)$. Plugging in $x=6$, we get $y = 42$.
-
0Tiny point: these manipulations only work if we know already that neither $x$ nor $y$ is $\infty$. Of course, this gap is not hard to fill. – 2011-01-08
Define a live n-sequence to be a sequence of $n$ dice throws in which no double 6 occurs. Define:
$r_n$ = number of live $n$-sequences that don't end in 6
$s_n$ = number of live $n$-sequences that do end in 6
Then we get the recurrence relations:
$r_{n+1} = 5r_{n} + 5s_{n}$
$s_{n+1} = r_n$
with initial conditions $r_0 = 1, s_0 = 0$. Substituting the second relation into the first gives
$s_{n+2} = 5s_{n+1} + 5s_{n}$
The solutions of this are of the form $s_n = A\alpha^n + B\beta^n$, where $\alpha$ and $\beta$ are the roots of the equation $x^2 - 5x - 5 = 0$:
$\alpha = (5 + 3\sqrt5)/2, \beta = (5 - 3\sqrt5)/2$
The probability that we need exactly $n$ throws is $\frac{1}{6} s_{n-1}/6^{n-1} = \frac{s_{n-1}}{6^n}$, so the expected number of throws is
$\sum_{n=1}^\infty n\frac{s_{n-1}}{6^n} = \frac{A}{\alpha}\sum_{n=1}^\infty nu^n + \frac{B}{\beta}\sum_{n=1}^\infty nv^n$
where $u = \frac{\alpha}{6}$ and $v = \frac{\beta}{6}$. This is
$\frac{A}{\alpha}\frac{u}{(1-u)^2} + \frac{B}{\beta}\frac{v}{(1-v)^2}$
From the initial terms $s_0=0, s_1=1$, we get $A = \frac{1}{3\sqrt 5}, B = -A$. So we get
$\frac{A}{6}(\frac{1}{(1-u)^2} - \frac{1}{(1-v)^2})$, which my shaky algebra simplifies to...wait for it...
$42$
-
0Nice answer as well, a bit overkill compared to Trevor's, but it has the bonus of providing not only the e$x$pectation but the full probability distribution. – 2011-01-08
The probability that you get a 6 after $n+1$ throws is $ \frac{5^n}{6^n} \frac{1}{6}$ that is getting $n$ times something else than a $6$ then getting a $6$. Therefore, the probability to throw $n$ times the dice and then to get two $6$ in a row is $ \frac{5^n}{6^n} \frac{1}{6^2}.$ The expectancy is thus $\frac{1}{6^2} \sum_{n=0}^{\infty}\frac{5^n}{6^n}.$
Does it answer your question?
-
1But I can get 6 in the some of n-1 first results following some of 5 other results which are not 6 for example 6162336466 is legal – 2011-01-08