2
$\begingroup$

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.

  • 0
    How often do you throw your dice?2011-01-08
  • 0
    Actually, you need the negative binomial distribution, which is a generalization of the geometric distribution.2011-01-08
  • 0
    @Ramsus I throw it continuously until I get the desired result.I need expectancy after how many throwing I get desired result2011-01-08
  • 0
    I forgot there is a complicating factor here, you want the first occurance of two 6 in a row. So to compute the probability that you have to wait a time $n$ you will have to exclude earlier appearances of a double 6 which can be tricky to do.2011-01-08
  • 0
    @Raskolnikov I need expectancy to get it first time2011-01-08
  • 0
    I 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 3

5

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$.

  • 0
    Can you expand a bit on how you did it? It doesn't agree with my numerical simulations. The expected number of throws should be around 42. Besides, the expected number of tosses to get one 6 should be 6.2011-01-08
  • 0
    Yes the x is geometric random variable so x=6 so we get 422011-01-08
  • 0
    But I still have to think about this2011-01-08
  • 0
    @Raskolnikov: To get one six, you have to toss the die at least once. Then you can either get a six or get back $x$. To get 2 consecutive sixes, you either get a six in the $x+1$-st trial or you do not.2011-01-08
  • 0
    I see, you build a recursion. But somehow, you must have made a mistake, because it is obvious that the expected number of tosses to get one six is 6. Just use the geometrical distribution with probability $p$, then it is known that the expected number of trials is $1/p$.2011-01-08
  • 1
    @Raskolnikov: I edited the formula for $x$.2011-01-08
  • 0
    Very nice solution.2011-01-08
  • 0
    Tiny 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
2

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$

  • 0
    Nice answer as well, a bit overkill compared to Trevor's, but it has the bonus of providing not only the expectation but the full probability distribution.2011-01-08
1

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?

  • 0
    You exclude the possibility of getting a 6 that is not followed by another 6.2011-01-08
  • 1
    But 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 legal2011-01-08