# Maximising the logarithmic expectation in coin bets

We are throwing a coin $N$ times and for some reason the probability that we get heads in the $n$-th toss is $p_n\geq\frac 12$. Now starting with capital $X_0$, before each toss we decide to bet a fraction of our current capital (possibly zero) on heads. If we are successful we win 100% of the stake otherwise we lose it. Let $X_N$ denote the capital after the final coin.

I've read some articles about such problems, "Kelly criterion" and so on. They all mention there are different optimal strategies depening on whether I want to maximise $E(X_N)$ or $E(\log X_N)$. How come?

I thought we had something like

$$E(X_N) = p_N(EX_{N-1} + u_N)+ (1-p_N)(EX_{N-1}-u_N)$$

$$E(\log X_N) = p_N\log(EX_{N-1} + u_N) + (1-p_N)\log(EX_{N-1}-u_N)$$

In both cases it seems advisable to bet everything ($u_N=X_{N-1}$) whenever $p_N > \frac 12$. Also if I want to maximise $E(\log X_N)$ should I only apply the $\log$ in the last step from $X_{N-1}$ to $X_N$, ie if I go backwards to calculate $EX_{N-2}, EX_{N-3}$ there is no $\log$ involved?

I think I'm completely missing the key ideas. According to Kelly it would be best to always bet $2p_n - 1$ if I understood that correctly.

You say "In both cases it seems advisable to bet everything". But your intuition is not correct. In fact, if you bet almost everything and lose, the log of your final amount of money approaches negative infinity, but if you win it approaches a finite value. So betting everything actually gives you infinitely negative expected value!

To see where the $2p_n-1$ value comes from, let's simplify this problem so there is only one coin flip. We start with $1$ unit of money, and $u$ , with probability $p$ of winning.

Then we're trying to maximize

$$p \cdot log(1+x) + (1-p) \cdot log(1-x)$$

Taking the derivative with respect to $x$ gives

$$\dfrac{p}{1+x} + \dfrac{p-1}{1-x}$$

Find where the derivative is $0$

$$0 = \dfrac{p}{1+x} + \dfrac{p-1}{1-x}$$

$$0 = p(1-x) + (p-1)(1+x)$$

$$0 = -x + 2p-1$$

$$x = 2p-1$$

Further tests show that this is the global maximum on $[0,1]$.