The Math Behind The Martingale Strategy

In the parent post about the Martingale Strategy, we saw that the net profit or the payoff at the end is constant irrespective of the number of rounds played. This however, is not the case always
In this post, I will be explaining the math behind the Martingale strategy by discussing what will happen if we triple/quadruple the amount (i.e any factor other than 2) instead of doubling.
Getting Into The Proof
Assumptions:
- The player has an infinitely large amount of money
- The player loses N-1 rounds and wins the Nth round
- Once the player has won, he/she quits immediately and does not continue playing
Notations:
- A — Starting amount: Amount which the player starts betting
- K — Multiplying factor: If the player loses a round, he mutiplies his stake by K in the next round
- N — The round in which the player wins (assuming he has lost the previous N-1 rounds)
- P — The net payoff/profit at the end of the Nth round
Consider a starting amount of A & multiplying factor K. The net payoff is equal to the win in the Nth round minus the cumulative losses in the previous N-1 rounds
Net Payoff = Loss in N-1 rounds + Win in Nth round
In the above equation, if we substitute K=2, we get the net payoff =A*[2^N*(1–1)+1] = A, the starting amount. This ties in with what we observed in the parent post — If we double the amount, the net payoff is the same as the initial amount we started with
Below is the table and graph for a multiplying factor of K=3 i.e the player triples his stake with each loss. N is the round in which he wins. For example, N=5 implies he loses 4 rounds & wins in the 5th round. His payoff is 4100. We can see that the payoff increases almost exponentially
Instead of doubling, if you choose to triple your amount, with each round you loose, your payoff will increase (approximately triple with every round)
Getting a Linear Relationship
We see that the Payoff (P) and Winning Round (N) have an exponential relationship. Let us see if we can convert it into a linear relationship. The most common way to convert an exponential relationship into a linear is by converting to logarithm and plotting
Let X & Y have the following relationship: Y = A^X
Taking logarithm gives us log(Y) = X*log(A). log(A) is a constant
log(Y) & X have a linear relationship and plotting this will give us a straight line
Let us try to do a similar transformation for the payoff equation
log(P) = log(CD) + N*log(K)
The above is a straight line between N & log(P). Comparing with the general equation of a straight line y = mx + c
Slope (m) = log(K) -> logarithm of the multiplying factor
The equation can be re-written as:
Graphing It
Below are the values and corresponding graph for N vs Payoff for K=4. We see that plotting the logarithm(base 10) of the payoff indeed gives us a straight line
The slope should be equal to log(K) = log(4) = 0.6020
The intercept should be equal to log(1000*2/(4*3)) = log(166.7) = 2.2218
The trendline equation on the graph is y = 0.6002x + 2.2574 which closely matches with the values we calculated. The slight variation in values is because of the approximation we took
Try setting the Multiplying factor to 1.5 or 1.75 (any number between 1 & 2) and see what happens. You will observe something interesting 😉😉
Thanks for reading!!
Originally published at http://infinitesimallysmallcom.wordpress.com on August 25, 2021.