# Wait, it is worth it?

You went to a Casino, and saw a quite interesting stall.

The cardboard besides the stall says:

You first pay \$$$5$$ You have to toss the fair coin. If it lands heads, you can throw again. If it lands tails, you have to stop. You throw the coin until it lands tail. The the money you get is the number of throws squared. But is this worth it? Bonus: What is the expected money gain or loss per round? Ok, this puzzle is quite easy. This is because I want to celebrate that I hit the rep cap for three consecutive days. • Does the final throw count? – the default. Jun 4 at 4:20 • @mypronounismonicareinstate yes – Culver Kwan Jun 4 at 4:20 ## 2 Answers The expected value is $$E = \frac{1}{2}(1) + \frac{1}{4}(4) + \frac{1}{8}(9) + \frac{1}{16}(16) + \frac{1}{32}(25) ...$$, so $$E = \sum \left(\frac{1}{2}\right)^n (n^2)$$ (all sums are 1 to infinity). What you can do here is Consider $$\sum x^n = \frac{x}{1-x}$$, for $$|x|<1$$. This equals $$1 - \frac{1}{1-x}$$. We take the derivative of both sides: $$\sum nx^{n-1} = \frac{1}{(1-x)^2}$$. Then, Consider multiplying both sides by $$x$$, and differentiating: on the left, we get $$\left(\sum nx^n\right)’= \sum n^2 x^{n-1}$$; on the right we get $$\left(\frac{x}{(1-x)^2}\right)’ = \frac{1+x}{(1-x)^3}$$. Next, Multiply both sides by $$x$$: $$\sum n^2 x^n = \frac{x(1+x)}{(1-x)^3}$$, for $$|x| < 1$$. Then sub in $$x = \frac{1}{2}$$, to get $$\sum n^2 \left(\frac{1}{2}\right)^n = \frac{(1/2)(3/2)}{(1-1/2)^3} = \frac{3/4}{1/8} = 6$$. Therefore The expected payout is 6, so the expected profit of every round is +1 (the bonus answer), which means you should play (the initial answer). • The St. Petersburg paradox has$2^n$, not$n^2$, though. – the default. Jun 4 at 4:22 • Folks: I’m just a moron who doesn’t know how to read. This should be better, with proof @CulverKwan. – El-Guest Jun 4 at 4:37 • Unfortunately a difficulty on mobile, but yes. – El-Guest Jun 4 at 4:53 • Then you shall receive my check mark! – Culver Kwan Jun 4 at 4:56 • It’s now 1am here, which explains why my smooth brain had so much difficulty... thank you & goodnight! – El-Guest Jun 4 at 4:57 Yes, it is worth it. Proof: Let's assume the number of throws is limited at 7. Then we have to evaluate the sum $$\sum_1^7 \frac{n^2}{2^n}$$ to get a lower bound on your expected winnings. That can be done on a calculator. It can be seen that the sum evaluates to about 5.35\$, and since there are no negative elements in the corresponding infinite sum, the expected value will never decrease. Therefore, your expected profit is not less than about 0.35\\$. The series seem to converge to 6, but I am not sure how to prove that.

• Bonus added! Try it. – Culver Kwan Jun 4 at 4:28