Expected value of a sum of geometric dice roll

161 Views Asked by At

We roll a 6 sided fair dice until the number 3 is received. What is the expected value of the sum of the rolls?

What I've done:

I defined a random variable $X$ to count the rolls amount. $X\sim G\left(\dfrac{1}{6}\right)$ so we have $P(X=k)=\left(\dfrac{5}{6}\right)^{k-1}\cdot\dfrac{1}{6}$

Then I defined another random variable, $S$, as the rolls sum. Using the law of total expectation we get $ E\left(S \right) =\sum ^{k}_{i=1}E( S| X= i) \cdot P( X= i) $

Now we define $x_{1},x_{2},\ldots ,x_{k}$ as the result of the $k$-th roll.

We note that $S=x_{1}+x_{2}+\ldots +x_{k}$, so we get: $$E\left( S\right) =E\left( x_{1}+x_{2}+\ldots +x_{k}\right)$$

$$\Rightarrow E( S| X= i) =E( x_{1}+x_{2}+\ldots +x_{i}| X= i)$$

Using the linearity of expectation, it is equal to: $$E( x_{1}|X=i) + E( x_{2}|X=i) + ... + E( x_{i}|X=i)$$

Now for each $1\leq t\leq i$ we have $$ E( x_{t}|X=i)= \sum_{j=1}^{6} j \cdot \frac{P(x_t = j, X=k)}{P(X=k)} $$

So that would conclude as $$E( S| X= i) = \sum_{t=1}^{i} \left( \sum_{j=1}^{6} j \cdot \frac{P(x_t = j, X=i)}{P(X=i)} \right) $$

But I'm not quite sure how to calculate the numerator here. Would appriciate a hint.

Thanks!

4

There are 4 best solutions below

1
On BEST ANSWER

Yet an other answer. Your approach works fine. Your variable $X$, the number of rolls, is in fact a stopping time, the time / the index of entering the set $\{3\}$. I will denote it by $T$ (to have the right letter $X$ free now for its standard use), and will denote by capitalized letters $X_1,X_2,X_3,\dots$ your i.i.d. variables denoted by their lower case cousins.

All you need to observe is the following. Conditioned by the event $T=N$, $N\ge 1$ natural number, "stopping in $N$", we have

  • $\Bbb E[X_N]=3$, since $X_N=3$ when $T=N$,
  • for $n<N$ then $\Bbb E[X_n]=\frac 15(1+2+4+5+6)=\frac{18}5$, since $X_n\ne 3$ when $T=N$.

Then, denoting by $S_N$ the sum of $X_1,X_2,\dots,X_N$ we compute the needed expected value (of the random variable $S_T$): $$ \begin{aligned} \Bbb E[S_T] &=\sum_{N\ge 1}\Bbb E[S_N|T=N]\cdot\Bbb P[T=N] \\ &=\sum_{N\ge 1}\frac 15\left(\frac56\right)^N \Big(\sum_{n<N}\Bbb E[X_n|T=N]\ +\ E[X_N|T=N]\Big) \\ &=\sum_{N\ge 1}\frac 15\left(\frac56\right)^N \Big(\color{maroon}{(N-1)\cdot\frac{18}5}+\color{blue}{3}\Big) \\ &=\color{maroon}{18}+\color{blue}{3}=\bbox[yellow]{21}\ . \end{aligned} $$ $\square$


Note (on the last sum): The sum over $\frac 15\left(\frac56\right)^N\cdot \color{blue}{3}$ is the probability to see at least once the $3$, times $\color{blue}{3}$, so it is $\color{blue}{3}$. In the remained sum, the maroon part, we start from $N=2$, and denoting by $M$ the value $M=N-2$ we have to compute $\frac 15\left(\frac56\right)^2\cdot \frac{18}5\sum_{N\ge 2}(N-1)\left(\frac 56\right)^{N-2}$ which is $\frac 12\sum_{M\ge 0}(M+1)p^M=\frac 12\left(\sum_{m\ge 0}p^m\right)'=\frac 1{2(1-p)^2}$, calculated in $p=5/6$. We get $\frac 1{2/36}=18$.

2
On

Let the desired expected value be denoted $E$.

Consider the possible outcomes of the first toss. If you get a $3$, then that's the total along that path. If you get $i\neq 3$ then you expect to get $E+i$ along that. We deduce that $$E=\frac 16\times (3+E+1+E+2+E+4+E+5+E+6)$$$$\implies 6E=5E+21$$$$\implies E=21$$

0
On

This is a special case of wald's equation. Namely we are interested in the random sum $$ S_{N} = \sum_{i=1}^N X_i $$ where $N$ is geometric random variable, the number of trials until we see $3$, $X_i$ are i.i.d uniform on $\{1,2,3,\dotsc,6\}$ and $N$ is independent of the $X_i$. Then $$ ES_{N}= E(E(S_{N}\mid N)) = E(N\times3.5)=3.5EN=3.5\times6=21 $$ by the law of total expectation.

0
On

Alternative approach:

Let $~p(n)~$ denote the probability that there are $~n~$ rolls that are not a "3", before the first "3" is rolled. When a "3" is not rolled, because the rolls of each element in $~\{1,2,4,5,6\}~$ are then equally likely, your expected roll on such a turn is $~3.6.$

Therefore, the desired computation is

$$\left[ ~\sum_{n=0}^\infty 3.6 \times p(n) \times n ~\right] + 3. \tag1 $$

Here,

$$\displaystyle ~p(n) = \frac{1}{6} \times \left[ ~\frac{5}{6} ~\right]^n. \tag2 $$


For $~0 < p < 1,~$ you have that

$$~\sum_{n=0}^\infty \left[ ~p^n \times (n+1) ~\right] = \left[ ~\frac{1}{1 - p} ~\right]^2. $$

This implies that

$$~\sum_{n=0}^\infty \left[ ~p^n \times n ~\right] = \left[ ~\frac{1}{1 - p} ~\right]^2 - \frac{1}{1 - p} \\ = \left[ ~\frac{1}{1 - p} ~\right] \times \left[ ~\frac{1}{1 - p} - 1 ~\right] \\ = \left[ ~\frac{1}{1 - p} ~\right] \times \left[ ~\frac{p}{1 - p} ~\right] = ~\frac{p}{(1 - p)^2}. \tag3 $$

When $~\displaystyle p = \frac{5}{6},~$ the result of the computation in (3) above is

$$\frac{(5/6)}{(1/6)^2} = 30. \tag4 $$

Merging the results of (1), (2), (3), and (4) above gives:

$$3 + \left\{ ~(3.6) \times \frac{1}{6} \times 30 ~\right\} = 3 + 18 = 21.$$