Artificial intelligent assistant

Conditional expectation for Kelly strategy/criterion > Consider a gambler who at each gamble either wins or loses his bet with probabilities $p$ and $1-p$, independent of earlier gambles. When $p > 1/2$ a popular gambling system known as the Kelly strategy, is to always bet the fraction $2p-1$ of the current fortune. Compute the expected fortune after $n$ gambles, starting with $x$ units and employing the Kelly strategy. So, I feel I need to use the rule $$\Bbb E[X] =\Bbb E\left[\Bbb E[X\mid Y]\right]$$ where $X =$ Fortune after $n$ gambles and $Y =$ Fortune after $n-1$ gambles. Also if I start with a fortune $a$, then I will earn $a(2p-1)$ with probability $p$ or lose $a(2p-1)$ with probability $(1-p)$. So my expected current fortune should be $$ap(2p-1) + a(1-p)(2p-1)$$ I don't really know how to continue after this.

Say the gambler currently has fortune $a$, then if he wins, he will earn $a(2p-1)$ and his fortune will become $a + a(2p-1) = 2pa$. If he loses, he will lose $a(2p-1)$ and his fortune will become $a-a(2p-1) = (2-2p)a$.

And we know that all the winning/losing events in the sequence are independent, so the joint probability can be calculated with simple multiplication.

Let's say, out of the $n$ gambles, he wins $i$ times and loses $(n-i)$ times, then after the $i$ wins and $(n-i)$ loss, his fortune will be $$ a \cdot (2p)^i \cdot (2-2p)^{n-i}$$

Then let's look at the wins and losses of the $n$ gambles. The probability of winning $i$ times (and clearly losing $n-i$ times) is equal to $$ \binom{n}{i} p^{i}(1-p)^{n-i} $$ because there are $\binom{n}{i}$ ways of winning exactly $i$ times (and losing exactly $(n-i)$ times).

Thus the expectation after $n$ gambles would be $$ \sum_{i = 0}^{n}\binom{n}{i}p^i(1-p)^{n-i}a(2p)^{i}(2-2p)^{n-i} $$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 23a2d4599f369e4df56afdd8f8c85bf7