Expected value of repeatedly betting on a coin flip? Consider the following game:

*

*You start with $1000

*Flip a fair coin

*If it's heads gain 21%, if it's tails lose 20%

*You can play as many times as you want

My question is:

*

*How would you calculate the expected amount of money you have after N games?

*How many times should you play?

If I consider playing a single round, the expected value would be:
$$
\begin{aligned}
E[1] &= 1000 \cdot ( 0.5 \cdot 1.21  + 0.5 \cdot 0.8 ) \\
&=1005
\end{aligned}
$$
It seems to me like the rational decision would be to play the game, because you expect to end up with more money. And then after your first coin toss, the same reasoning should apply for the decision about whether to play a second time, and so on... So then it seems like you should play as many times as possible and that your amount of money should approach infinity as N does. However when I simulate this in Python I am finding that the final amount of money always tends toward zero with enough flips. How can a game where each round has a positive expected return end up giving a negative return when played many times?

I read about the Kelly Criterion and think it might apply here. Calculating the geometric growth rate:
$$
\begin{aligned}
r &= (1 + f \cdot b)^p \cdot (1 - f \cdot f )^{1-p} \\
&= (1 + 1 \cdot 0.21)^{0.5} \cdot (1 - 1 \cdot 0.2 )^{0.5} \\
&= 0.983870 
\end{aligned}
$$
This seems to indicate that I should not play, because the geometric growth rate is below 1. But how do I reconcile that with my reasoning above and the fact that the expected gain of playing any individual round is positive?
 A: The expected product of $n$ tosses is
$$\sum\limits_{k=0}^n 1.21^{n-k}0.80^k\binom{n}{k}\left(\frac{1}{2}\right)^n=(1.21+0.80)^n\left(\frac{1}{2}\right)^n=1.005^n$$
With $500$ tosses, the product is almost always close to $0$. But sometimes (very rarely), the product must be large, so that the average of the product is $1.005^{500}\approx 12.1$.
A: Your mathematical analysis of the problem is correct, the real question:

How can a game where each round has a positive expected return end up
giving a negative return when played many times?

So let me break it down into a few separate points.
$\newcommand{\E}{\operatorname{\mathbb{E}}}$

Why there's positive expected return. Let $S_n$ be the money after $n$ steps. This means that $S_0 = \$ 1000$ (the actual amount is not relevant here) and that given $S_n$, we have $S_{n+1} = 1.21 \cdot S_n$ or $S_{n+1} = 0.8 \cdot S_n$ with equal probability. As you observed yourself, we have $\E(S_{n+1}|S_n) = 1.005 \cdot S_n$ (one could say that $S_n$ is a submartingale) and so $\E S_n = 1.005^n \cdot S_0$, which tends to infinity as $n \to \infty$.
Why there's negative return in the limit. Again, you pointed out that the logarithmic behavior (i.e. geometric growth/decay) is different. Letting $L_n := \ln S_n$, we see that $L_n = \varepsilon_1+\ldots+\varepsilon_n$, where $\varepsilon_i$ are iid variables with $\mathbb{P}(\varepsilon_i = \ln 1.21) = \mathbb{P}(\varepsilon_i = \ln 0.8) = \frac 12$. The expected value is
$$ \E \varepsilon_i = \frac 12 \ln(1.21) + \frac 12 \ln(0.8) = \frac 12 \ln(0.968) < 0, $$
so $L_n$ is a random walk with a negative drift (and hence, a supermartingale). By the law of large numbers, $\frac{\varepsilon_1+\ldots+\varepsilon_n}{n} \to \ln(0.968)$ a.s. as $n \to \infty$, which in particular means that $L_n \to -\infty$ and $S_n \to 0$ a.s.
Why we're surprised. An implicit assumption in your question is that of continuity. If $S_n \to 0$, by continuity we expect that $\E S_n \to 0$. But this fails, or at least the assumption $S_n \to 0$ a.e. is too weak to guarantee $\E S_n \to 0$ (assuming e.g. $S_n \to 0$ in $L^1$ would be obviously enough). So when you asked how can this game end up giving a negative return when played many times, this wasn't exactly correct. Playing many times gives a positive return, but playing infinitely many times gives a negative return. People often use these two phrases interchangeably, which doesn't lead to confusion as long as things behave continously. And here, they don't.
Why we should or shouldn't play the game. It's common to interpret the question should I play the game? mathematically as what's the expected value? By the law of large numbers, this makes sense as long as you can play the game many times according to the same rules, because the average outcome becomes more and more predictable.
In our case, if I could play it many times with the bet of $\$ 1000$, I would. But this is not the question asked here: the process $S_n$ corresponds to playing the game many times with different rules each time (the bet depends on the previous games). The expected value indeed gets larger and larger, but the outcome doesn't get more predictable. Quite the opposite: there are tiny chances of making astronomical profits and large chances of loosing almost everything (it's this pathological behavior that's responsible for failure of $L^1$-convergence). In such cases, you have to take into account your utility function, which probably isn't linear, and so basing the decision on the expected value alone would be unwise.
