Expected value with a die with 9 faces

970 Views Asked by At

You have a die with $9$ faces, which are numbered $1, 2, 3, \dots,9$. All the numbers have an equal chance of appearing. You roll the die repeatedly, write the digits one after another, and you stop when you obtain a multiple of $3$. For example, you could roll a $4$, then a $1$, then a $7$. You would stop at this point, because $417$ is a multiple of $3$ but $4$ and $41$ are not.

Find the expected number of times that you roll the die.


I'm not sure how to find the expected value of something, can I get a solution to this problem?

2

There are 2 best solutions below

3
On BEST ANSWER

Note that at any point, there are $3$ values from $1\to 9$ that would make the number a multiple of $3$ if rolled, since a number is a multiple of $3$ iff its sum of digits is.

If the sum of the currently rolled digits mod $3$ is $1$, then $2,5,8$ would make the number a multiple of $3$.

If the sum mod $3$ is $2$, then $1,4,7$ would make the number a multiple of $3$.

If this is the first roll, then $3,6,9$ would make the number a multiple of $3$.

So, the expected value is just $$\frac1{1/3}=3$$

2
On

Hint: because the number will be divisible by 3 iff the sum of its digits is a multiple of 3, at each stage the probability of stopping is $1/3$ and the probability of having to roll again is $2/3$. The probability, $p_n$ say, of having to roll exactly $n$ times is therefore $(2/3)^{n-1}(1/3)$. The expected number of throws is then $\sum_{n=1}^{\infty}np_n$. To calculate this, you can use the formula for the sum of a geometric sequence to show that $\sum_{n=1}^{\infty}nx^{n-1} = 1/(1-x)^2$.