Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Approaching the following problem:

Gambles are independent, and each one results in the player being equally likely to win or lose 1 unit. Let $W$ denote the net winnings of a gambler whose strategy is to stop gambling immediately after his first win. Find $E[W]$

Realizing that the expectation is not just $E[ W] = \sum\limits_{x} i \left(\frac{ 1}{ 2}\right)$ I am unsure of how to approach the problem.

Letting $W_L$ be the value of $W$ accumulated by loses and $W_W$ be the value of $W$ accumulated by wins, I am inclined to believe we are looking at $E[ W_L] = \sum\limits_{i = 0}^\infty -i \left(\frac{ 1}{ 2}\right)^i$ and the $E[ W_W] = 1$.

However, 1) I do not know if this is the correct approach and 2) should this indeed be the correct approach, I do not understand [conceptually ] how to merge these two summations?

share|cite|improve this question
How is $X$ related to $W$? – sai Jul 27 '12 at 1:38
Typo, I apologize! Also since you mention it, I should probably go ahead and change that summation too. – rudolph9 Jul 27 '12 at 1:50
Your approach is good except for the power of 1/2 in $E[ W_L] = \sum\limits_{i = 0}^\infty -i \left(\frac{ 1}{ 2}\right)^{i+1}$. For the overall winnings add $E[W_L]$ and $E[W_W]$ to get zero. – Byron Schmuland Jul 27 '12 at 2:41
up vote 2 down vote accepted

Let $W$ be the "winnings," and $X$ the number of trials until the first head. Then $W=-(X-1)+1=2-X$.

Now use the fact that $E(X)=\frac{1}{1/2}$ and the fact that $E(2-X)=2-E(X)$.

Here we used the fact that if $p$ is the probability of success on any trial, and $p\ne 0$, then $E(X)=\frac{1}{p}$. (The random variable $X$ has geometric distribution.)

There are various ways to prove the required result. For example, when $p=1/2$, the probability that $X=n$ is equal to $\frac{1}{2^n}$. So $$E(X)=1\cdot \frac{1}{2}+2\cdot \frac{1}{^2}+3\cdot \frac{1}{2^3}+\cdots.\tag{$1$}$$ Multiply by $2$. We get $$2E(X)=1+2\cdot \frac{1}{2}+3\cdot \frac{1}{2^2}+4\cdot\frac{1}{2^3}+\cdots.\tag{$2$}.$$ Subtract $(1)$ from $(2)$. We get $$E(X)=1+\frac{1}{2}+\frac{1}{2^2}+\frac{1}{2^3}+\cdots.$$ The series on the left is an infinite geometric series with sum $2$.

Another way: We find $E(W)$ directly. With probability $\frac{1}{2}$ we win immediately, ending up with $1$ dollar. With probability $\frac{1}{2}$ we "win" $-1$ dollar on the first throw, and in effect the game starts all over again, and our expected net gain is $E(W)$. It follows that $$E(W)=\frac{1}{2}\cdot 1+\frac{1}{2}\cdot(-1)+\frac{1}{2}E(W)).$$ On the assumption that $E(W)$ is finite, we can now solve the above equation for $E(W)$, and find that $E(W)=0$.

share|cite|improve this answer
How are you able to assert $E[ X] = \frac{ 1}{ 1/2}$ and how does all fit together to get the $E[W] = 0$? – rudolph9 Jul 27 '12 at 1:55
I do see how pluggin the value you got back into what you defined for $W$ would give you zero but conceptually I do not understand how you are able to simply plug back an expected value for the variable $X$ when solving for the the expected value of $W$ which is dependent on $X$? – rudolph9 Jul 27 '12 at 1:59
I have added a lot of stuff, including many details. – André Nicolas Jul 27 '12 at 5:43
Thanks for clarifying! – rudolph9 Jul 27 '12 at 14:29

Let $X_1,X_2,\dots$ be the winnings on the individual bets, and $N$ the stopping time representing the gambler's strategy. Since it is a fair game, we have $E(X)=(-1){1\over 2}+(1){1\over 2}=0$. The gambler's total winnings are $W=X_1+X_2+\cdots+ X_N$ and by Wald's equation we get $\mathbb{E}(W)=\mathbb{E}(N)\mathbb{E}(X)=0.$

The moral of the story is that the average winnings of a fair game is zero, no matter what stopping strategy you adopt.

share|cite|improve this answer

Let $X$ denotes the number of trial of which winning occurs. Then we have:


Hence the expectation would be:

$E[W]\\=E[E[W|X]]\\=\sum\limits_{x} E[W|X=x]P\{X=x\}\\=\sum\limits_{x=1}^\infty \frac{(2-x)}{2^x}\\=0$

Note: The only thing that is little tricky here is to find $\sum\limits_{x=1}^\infty \frac{x}{2^x}$, however we have:

$\frac{1}{2}\sum\limits_{x=1}^\infty \frac{x}{2^x}\\=\sum\limits_{x=2}^\infty \frac{x-1}{2^x}\\=(\sum\limits_{x=1}^\infty \frac{x}{2^x}-\frac{1}{2})-\frac{1}{2}$

So that $\sum\limits_{x=1}^\infty \frac{x}{2^x}=2$.

share|cite|improve this answer
I don't see where your getting $\frac{ 1}{ 2} \sum\limits_{x = 1}^\infty \frac{ x}{ 2^x}$ from? – rudolph9 Jul 27 '12 at 14:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.