Expected Value Of Dice Rolling Game

758 Views Asked by At

I am having trouble figuring out the expected value in situations were the examples are going to infinity.

Example:

I have a fair dice with 8 sides. I keep a counter ($k$) of the rounds I play. Each round I increase the counter by 1 and I roll the die. I keep doing this until I roll a 1 or an 8.

So I'll define a random variable $X$ to be the amount of rounds played. I know that the odds of rolling a 1 or a 8 on a 8 sided die is $\frac1 4$ otherwise it is $\frac3 4$. The way I am trying to solve the expected value is by using a geometric series. This is where I am getting stuck I think it should look like this:

$E(X)=X_1P_1+X_2P_2+X_3P_3+...+X_nP_n$

$E(X)=1*\frac1 4+2*\frac1 4+3*\frac1 4+...+n*\frac1 4$

I am unsure how to turn this into a sum.

1

There are 1 best solutions below

1
On

There is an easy trick for this calculation, using the following fact, for a random variable $X$ and a specific value $x$: $$ E(X)=P(X=x) \cdot E(X\mid X=x)+P(X\neq x)\cdot E(X\mid X\neq x) $$ (where $E(X\mid X=x)=x$, of course).

We can let $X$ be the number of throws we do in total (including the last $1$ or $8$), and $x=1$. This gives $$ E(X)=\frac14+\frac34E(X\mid X\neq 1) $$ But $X\mid X\neq 1$ just means "we know we fail on the first throw, and then we keep going as normal", which means that $$ E(X\mid X\neq1)=1+E(X) $$ and this gives $$ E(X)=\frac14 +\frac34(1+E(X)) $$which may be solved as a normal equation.