# Expected value stopping time $E(\tau)$ with $\tau=\inf\{k>0 \mid X_k=1\}$

I am a little confused about the expectation $E(\tau)$ of the stopping time $$\tau=\inf\{k>0 \mid X_k=1\},$$with the $X_i$ independent random variables with values $-1$ and $1$, where $P(X_1=1)=1/2$ and $P(X_1=-1)=1/2$. I thought this is $$E(\tau)=1\cdot P(\tau=1)+2\cdot P(\tau=2)+\dots=\sum_{i=1}^{\infty}\frac{n}{2^n}.$$ Is this correct and what is the value of the series? Thanks for the help

• How do you get $P(\tau=k)=1/2^k$?? – user940 Oct 24 '16 at 16:09
• @ByronSchmuland well, $\mathbb{P}(\tau=k) = \mathbb{P}(X_1 = -1, \ldots, X_{k-1}=-1, X_k = 1) = 2^{-k}$ by independence... ? – saz Oct 24 '16 at 16:39
• @ByronSchmuland, $\tau$ has geometric distribution with parameter $1/2$. At first I read the problem carelessly and thought that $(X_k)$ is a SRW (so that $\tau$ has heavy tail), but in fact this is simply a coin tossing. – Sangchul Lee Oct 24 '16 at 16:43
• @saz Apologizes! I completely misread the question. – user940 Oct 24 '16 at 16:48
• The process is not a martingale, and I guess the "martingale" tag threw me off. – user940 Oct 24 '16 at 16:49

Yes, looks good (just as a side remark: it should read $\sum_{i=1}^{\infty}$ instead of $\sum_{n=1}^{\infty}$). In order to calculate $\sum_{i=1}^{\infty} \frac{i}{2^i}$ use that
$$\sum_{i=1}^{\infty} i x^i = \sum_{i=1}^{\infty}(i+1) x^i - \sum_{i=1}^{\infty} x^i = \frac{d}{dx} \left( \sum_{i=1}^{\infty} x^{i+1} \right) - \sum_{i=1}^{\infty} x^i$$
for any $x \in (-1,1)$.