Expected value in coin flipping process You flip a coin, and if the result is tails, you lose. If the result is heads, you get to play again. What is the expected value of throws before you lose?
My Approach
The expected value is the sum of all the outcomes multiplied by their respective probabilities:$$\sum_{i=1}^{n}V_iP_i$$So for this problem:$$\sum_{i=1}^{\infty}i(\frac{1}{2^i})=0.5+0.5+0.375+…$$I can’t figure out how to find the sum, even though I know it converges.
 A: A different perspective: If the first coin is T then it's lived for 1 minute, and if H, then you're repeating exactly the same process a minute later, so the time you should expect to wait is
$$x =  \frac{1}{2} \cdot 1 + \frac{1}{2}(x+1) \Rightarrow x=2$$
A: In general, starting with a geometric series ($\sum_{j=0}^{\infty} x^j = 1/(1-x)$), you can evaluate many related series by taking derivatives or integrals.

*

*When you need to shift the exponent, multiply or divide by a power of $x$;

*When you need to multiply the coefficient by the exponent, take a derivative;

*When you need to divide the coefficient by the exponent, take an integral.

In this case,
$$
\sum_{j=0}^{\infty} j x^j=x\frac{d}{dx}\sum_{j=0}^{\infty} x^{j}=x\frac{d}{dx}\frac{1}{1-x}=\frac{x}{(1-x)^2}.
$$
Substituting $x=1/2$ gives $x/(1-x)^2=(1/2)/(1/2)^2=2.$
A: This is an Arithmetic-Geometric Series. Let $S=\displaystyle \sum_{i=1}^{N}\frac{i}{2^i}$. Then,
$$S=\displaystyle\frac {1}{2^1}+\frac {2}{2^2}+\frac{3}{2^3}+…+\frac{N}{2^N}.\tag{1}$$
Now, divide the whole equation by $2$ and arrange it by shifting the terms by a step: $$\frac{S}{2}=\frac {1}{2^2}+\frac {2}{2^3}+\frac{3}{2^4}+…+\frac{N-1}{2^{N}}+\frac{N}{2^{N+1}}.\tag{2}$$ $(1)-(2)$:$$\frac{S}{2}= \frac {1}{2^1}+\frac {1}{2^2}+\frac{1}{2^3}+…+\frac{1}{2^N}+\frac{1}{2^{N+1}}.$$This is a G.P., so sum is $$\frac{S}{2}=\frac 12\left(\frac{1-\left(\frac12\right)^{N+1}}{1-\frac12}\right)$$$$\implies S =\left(\frac{1-\left(\frac12\right)^{N+1}}{1-\frac12}\right)$$ Taking an infinite sum gives us $S_{\infty}=2$, which is the required answer.
