1

I solved it using Recursive method, i.e. $$E=\frac12(E+1)+\frac14(E+2)+\frac14*2$$

Which gave the answer $E=6$

I Also found probablity that it ends in $n$ tosses is $\frac{F_{n-1}}{2^n}$

Thus $$E[X]=\sum_{n=0}^\infty\frac{n\,F_{n-1}}{2^n}$$ where $F_n$ is the nth Fibonacci number with $F_0=0$, $F_1=1$

Is there a nice way to solve this summation?

Anvit
  • 3,379
  • Well, you can get it from the generating function for the Fibonacci numbers. The function $F(x)=1+x+2x^2+\cdots =\sum F_nx^n=\frac 1{1-(x+x^2)}$. You can manipulate this and compute your sum. – lulu Jun 26 '18 at 09:55
  • Note: the way I have written the fibonacci numbers, $F_0=1$ so you will have to modify the function in a small way to get what you need. – lulu Jun 26 '18 at 09:57

1 Answers1

1

The standard generating function for the Fibonacci numbers is $$1+x+2x^2+3x^3+\cdots =\frac 1{1-(x+x^2)}$$

See this question for example.

Note that this expression is using $F_0=F_1=1$ so, as you are using $F_0=0, F_1=1$ we need to consider the function $$F(x)=x+x^2+2x^3+\cdots =\frac x{1-(x+x^2)}=\sum_0^{\infty} F_nx^n$$

Where, to stress, we are using your version of the $F_n$.

We then remark that $$xF(x)=\sum_0^{\infty} F_nx^{n+1}\implies \left(xF(x)\right)'=\sum_0^{\infty} (n+1)F_nx^n$$

$$\implies \left(xF(x)\right)'\Big \vert_{x=\frac 12}=\sum_0^{\infty}\frac {(n+1)F_n}{2^n}=\sum_1^{\infty}\frac {nF_{n-1}}{2^{n-1}}$$

$$\implies \sum_1^{\infty}\frac {nF_{n-1}}{2^{n}}=\frac 12\times \left(xF(x)\right)'\Big \vert_{x=\frac 12}$$

We then remark that $$\left(xF(x)\right)'=\frac {(2-x)x}{(1-x-x^2)^2}\implies \left(xF(x)\right)'\Big \vert_{x=\frac 12}=12$$ and we are done.

lulu
  • 70,402
  • Oh, I Thought $F_0=0$ was standard. Mathematica gives Fibonacci$[0]=0$. Anyways, Thanks – Anvit Jun 26 '18 at 10:29
  • Your version is perfectly standard! The question I linked to uses the other version so I started from that one. Anyway, it's just a convention. – lulu Jun 26 '18 at 10:31