0
$\begingroup$

A coin is tossed until the first time a head turns up. If this occurs at the nth step, then the player wins $\frac{2^n}{n}$ dollars if n is odd,and loses $\frac{2^n}{n}$ dollars if n is even. Let X be the amount the player wins. Find E(X) if it exists.

Im a little bit stucked at this question. I understand that X distribute G($\frac{1}{2}$) but I dont know how to refer to the fact that n can be n even or odd.

thanks for helping

  • 0
    Is $\frac {2n}n$ different from $2$?2017-01-07
  • 0
    This particular question is usually asked with $2^n/n$ - I guess you made a typo?2017-01-07
  • 0
    You are aware that $\frac {2n}n=2$?2017-01-07
  • 0
    @ChristianIvicevic: Which implies that you already have a dup at hand...?2017-01-07
  • 0
    yes I change it now sorry2017-01-07
  • 0
    @barakmanos Not exactly but this is a problem I came up with for my students a while ago as well :)2017-01-07

2 Answers 2

1

Expecation in this particular case

Let's ignore $n$ being either even or odd for a moment and look at the expected value for any $n$. Let $X$ be the profit which can be negative if we lose. The expectation is given using (and assuming the coin is fair)

$$\mathbb{E}[X]=\sum_{n=1}^\infty\left((-1)^{n+1}\cdot\frac{2^n}{n}\right)\cdot\frac{1}{2^n}=\sum_{n=1}^\infty(-1)^{n+1}\cdot\frac{1}{n}.$$

This is the alternating harmonic series which converges to $\log(2)$. However the expectation only exists if it converges absolutely as well! Looking at

$$\sum_{n=1}^\infty\left|(-1)^{n+1}\cdot\frac{2^n}{n}\right|\cdot\frac{1}{2^n}=\sum_{n=1}^\infty\frac{1}{n}$$

we notice the harmonic series is divergent hence there is actually no expectation for $X$.


Adjustments to make the expectation exist

Just a sidenote if you're interested: The general harmonic series $\sum_{n=1}^\infty 1/n^\alpha$ does converge for $\alpha>1$; otherwise, it diverges. Therefore changing the game to have a profit of $2^n/n^2$ for example will yield $\mathbb E[X]\neq \infty$ but $\operatorname{Var}[X]=\infty$.

1

The probability that the first head occurs with the $n$th toss is $2^{-n}$. And in this case the player wins $w(n)=(-1)^{n+1}\cdot \frac {2^n}n$. Hence $$E(X)=\sum_{n=1}^\infty 2^{-n}\cdot w(n)= \sum_{n=1}^\infty \frac{(-1)^{n+1}}n.$$ You should ecognize the series on the right as some logarithm.

  • 0
    This is partly true assuming this wasn't just a hint ( :-) ) - you haven't explicitly checked for absolute convergence though, which is necessary for the existence of the expectation.2017-01-07