0

The first way that makes sense for me is using the definition of expected value, which is probability * number of flips.

Let $x$ be expected rolls to get a $6$.

$x = \frac{1}{6}(1) + \frac{5}{6}(x+1)$, $x = 6$, formula here makes sense.

But for the next formula, idk what it is about, but it works

$x = 1 + \frac{1}{6}(x)$

Can someone explain what is this second formula and why is it working? ie, does the formula have a concept in math I can google?

Thanks!

Bowei Tang
  • 3,763

2 Answers2

1

$x=\frac16 \times 1 + \frac56 \times (x+1)$ might be written in words as

you have a probability of $\frac16$ of throwing a six immediately (in which case you need $1$ attempt in total) and a probability of $\frac56$ of throwing something else (in which case you go on throwing, expecting to need $x$ further attempts in addition to your $1$ initial failure).

$x=1 + \frac56 \times x$ might be written in words as

you make one attempt and count it; if this is a six then you stop but with probability $\frac56$ you throw something else initially and so have to start again, expecting to need $x$ further attempts.

As you might hope, both give the correct solution of $x=6$.

Henry
  • 169,616
  • does the second one have anything to do with geometric sequence? – anonymouss Jun 17 '24 at 15:42
  • @anonymouss. The geometric random variable expectation can be written as $1\times \frac16 +2\times \frac56\times \frac16 + \cdots + n \times \left(\frac56\right)^{n-1} \times \frac16 +\cdots$ which is also $6$. – Henry Jun 17 '24 at 16:55
0

Expanding on the comment of Henry, following his answer.

$\underline{\text{Preliminary Results}}$

PR-1
$\sum_{i=0}^n x^i = \frac{1 - x^{n+1}}{1-x}.~$
Proof
Proceed by induction.
$~n=1.~$
$(1 + x^1)(1 - x) = 1 - x^2.$
Assume true for $~n = N.$
Then $~\displaystyle \left( ~1 + x^1 + \cdots + x^N + x^{N+1} ~\right) \times (1 - x) $
$\displaystyle = \left[ ~\left( ~1 + x^1 + \cdots + x^N ~\right) \times (1 - x) ~\right] + \left[ ~x^{N+1} \times (1 - x) ~\right]$
$\displaystyle = \left[ ~1 - x^{N+1} ~\right] + \left[ ~x^{N+1} - x^{N+2} ~\right]$
$\displaystyle = 1 - x^{N+2}.$

PR-2
For $~\displaystyle |x| < 1, \lim_{n\to\infty}x^n = 0.$
Proof
Immediately seen to be true when $~x = 0.~$
Now, assume that $~0 < x < 1 \implies \ln(x)~$ is some fixed negative constant.
Then $~\ln(x^n) = n\ln(x),~$
and as $~n \to \infty,~$ you have that $~n\ln(x) \to -\infty.~$
Therefore, (somewhat informally)
as $~n \to \infty, ~\displaystyle x^n = e^{n\ln(x)} \to e^{-\infty} = 0.$
Now suppose that $~-1 < x < 0,~$ and let $~y = -x \implies 0 < y < 1.~$
Then, by the first part of this proof, you have that
$~\displaystyle \lim_{n \to \infty} y^n = 0.~$
You also have that the sequence $~x^1, ~x^2, ~x^3,~$ is the same as the sequence
$-y^1, ~+y^2, ~-y^3, ~+y^4, \cdots, ~$
with $~\pm y^n~$ going towards $~0.~$
Therefore, when $~-1 < x < 0,~$
you also have that $~\displaystyle \lim_{n \to \infty} x^n = 0.~$

PR-3
For $~\displaystyle |x| < 1, ~\sum_{i=0}^n x^i = \frac{1}{1-x}.~$
Proof
Using the result in PR-1, for a specific positive integer $~n,~$
you can regard the estimation of $~1 + x + x^2 + \cdots + x^n \approx \dfrac{1}{1 - x},~$
as having an error of $~\displaystyle \frac{-x^{n+1}}{1 - x}.~$
Then, by PR-2, for $~|x| < 1,~$ you have that the error goes to $~0.$

PR-4
For $~\displaystyle |x| < 1, ~\sum_{i=0}^\infty ix^i = \frac{x}{(1-x)^2}.~$
Proof
See the preliminary results in this answer.
See also the Addendum, at the end of this answer, for an alternative proof of PR-4.


Inelegant solution based on geometric series.

Let $~f(n)~$ denote the probability that it takes exactly $~n~$ die throws to get the first $~6.~$

Then

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

Therefore, the expected number of throws is

$$\sum_{n=1}^\infty [ ~n \times f(n) ~]$$

$$= \frac{1}{6} \times\sum_{n=1}^\infty \left\{ ~n \times \left[ ~\frac{5}{6} ~\right]^{n-1} ~\right\}$$

$$= \frac{1}{6} \times \frac{6}{5} \times\sum_{n=1}^\infty \left\{ ~n \times \left[ ~\frac{5}{6} ~\right]^n ~\right\}. \tag1 $$

Note that the expression in (1) above can harmlessly start at $~n = 0,~$ because of the factor of $~n.~$

Therefore, the expected number of die throws is

$$= \frac{1}{5} \times \sum_{n=0}^\infty \left\{ ~n \times \left[ ~\frac{5}{6} ~\right]^n ~\right\}. \tag2 $$

All that remains is to plug in the formula for PR-4, into the expression in (2) above.

This gives

$$\frac{1}{5} \times \frac{5/6}{\left[ ~1 - 5/6 ~\right]^2}$$

$$= \frac{1}{5} \times \frac{5/6}{1/36} = \frac{1}{5} \times [ ~5 \times 6 ~] = 6.$$


$\underline{\text{Addendum}}$

For what it's worth, assuming that PR-3 is true, PR-4 may also be (inelegantly) alternatively proven as follows:

For $~|~x~| < 1,~$
let $~S~$ denote $~1 + x + x^2 + \cdots = \dfrac{1}{1 - x}.~$

Then,

$$1x + 2x^2 + 3x^3 + \cdots$$

may be alternatively expressed as

x + x^2 + x^3 + x^4 + ... : equal to x   \times S
  + x^2 + x^3 + x^4 + ... : equal to x^2 \times S 
        + x^3 + x^4 + ... : equal to x^3 \times S
              + x^4 + ... : equal to x^4 \times S
                    + ...

So, you end up with

$$S \times \left[ ~x + x^2 + x^3 + x^4 + \cdots ~\right]$$

$$ = \frac{1}{1 - x} \times \frac{x}{1 - x}.$$

user2661923
  • 42,303
  • 3
  • 21
  • 46